mirror of
https://github.com/systemd/systemd
synced 2024-11-02 19:41:12 +00:00
open-file: Fix user-after-free
This commit is contained in:
parent
d59ce37c28
commit
85e2e80699
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ int open_file_parse(const char *v, OpenFile **ret) {
|
|||
}
|
||||
|
||||
if (isempty(of->fdname)) {
|
||||
free(of->fdname);
|
||||
of->fdname = mfree(of->fdname);
|
||||
r = path_extract_filename(of->path, &of->fdname);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
|
Loading…
Reference in a new issue