core: add free_and_replace() at one more place

This commit is contained in:
Lennart Poettering 2018-10-26 19:33:10 +02:00
parent 7593c3ecbf
commit 6897dfe85a

View file

@ -4659,8 +4659,7 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
return -ENOMEM; return -ENOMEM;
} }
free(c->path); free_and_replace(c->path, p);
c->path = p;
return strv_free_and_replace(c->argv, l); return strv_free_and_replace(c->argv, l);
} }