core/namespace: use free_and_replace()

This commit is contained in:
Yu Watanabe
2018-02-21 09:05:21 +09:00
parent 55fe743273
commit e282f51f57
+1 -3
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;
}