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:
375fd15
)
basic/env-uil: fix assertion failure in strv_env_replace (#4688)
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Thu, 17 Nov 2016 21:25:01 +0000
(16:25 -0500)
committer
Martin Pitt
<martin.pitt@ubuntu.com>
Thu, 17 Nov 2016 21:25:01 +0000
(22:25 +0100)
free_and_replace sets the setcond argument to NULL (it's designed
to be used with _clenaup_ macros), and we don't want that here.
Fixes #4684.
src/basic/env-util.c
patch
|
blob
|
history
diff --git
a/src/basic/env-util.c
b/src/basic/env-util.c
index
7c69ccd
..
96da38d
100644
(file)
--- a/
src/basic/env-util.c
+++ b/
src/basic/env-util.c
@@
-395,7
+395,8
@@
int strv_env_replace(char ***l, char *p) {
for (f = *l; f && *f; f++)
if (env_match(*f, p)) {
- free_and_replace(*f, p);
+ free(*f);
+ *f = p;
strv_env_unset(f + 1, p);
return 0;
}