mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
[tempname] Sorry, I guess stracpy is better here. Later file is freed with mem_free.
This commit is contained in:
parent
bd442edc8a
commit
cfe564167b
@ -1069,7 +1069,7 @@ char *tempname(char *dir, char *pfx, char *suff) {
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
ret = strdup(path.source);
|
ret = stracpy(path.source);
|
||||||
done_string(&path);
|
done_string(&path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1093,7 +1093,7 @@ char *tempname(char *dir, char *pfx, char *suff) {
|
|||||||
free(temp);
|
free(temp);
|
||||||
add_shell_safe_to_string(&name, suff, strlen(suff));
|
add_shell_safe_to_string(&name, suff, strlen(suff));
|
||||||
|
|
||||||
ret = strdup(name.source);
|
ret = stracpy(name.source);
|
||||||
done_string(&name);
|
done_string(&name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user