1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-04 17:47:03 +03:00

core/namespace: use free_and_replace()

This commit is contained in:
Yu Watanabe 2018-02-12 14:27:49 +09:00
parent 55fe743273
commit e282f51f57

View File

@ -365,9 +365,7 @@ static int prefix_where_needed(MountEntry *m, unsigned n, const char *root_direc
if (!s)
return -ENOMEM;
free(m[i].path_malloc);
m[i].path_malloc = s;
free_and_replace(m[i].path_malloc, s);
m[i].has_prefix = true;
}