core: add free_and_replace() at one more place
This commit is contained in:
parent
7593c3ecbf
commit
6897dfe85a
|
@ -4659,8 +4659,7 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
free(c->path);
|
||||
c->path = p;
|
||||
free_and_replace(c->path, p);
|
||||
|
||||
return strv_free_and_replace(c->argv, l);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue