projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
55fe743
)
core/namespace: use free_and_replace()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Mon, 12 Feb 2018 05:27:49 +0000
(14:27 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 21 Feb 2018 00:05:21 +0000
(09:05 +0900)
src/core/namespace.c
patch
|
blob
|
history
diff --git
a/src/core/namespace.c
b/src/core/namespace.c
index
058b691
..
5dd2cc7
100644
(file)
--- a/
src/core/namespace.c
+++ b/
src/core/namespace.c
@@
-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;
}