projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b4da1f
)
notify_systemd: unset NOTIFY_SOCKET later
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Tue, 8 Sep 2015 14:46:27 +0000
(16:46 +0200)
committer
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Mon, 14 Sep 2015 18:41:31 +0000
(20:41 +0200)
getenv returns a pointer, possibly to a static buffer.
If I understand the specs correctly, unsetenv is basically free
to do what it wants with this, so don't keep using the pointer
after we do unsetenv.
src/daemon/collectd.c
patch
|
blob
|
history
diff --git
a/src/daemon/collectd.c
b/src/daemon/collectd.c
index
df238e7
..
fc52933
100644
(file)
--- a/
src/daemon/collectd.c
+++ b/
src/daemon/collectd.c
@@
-501,6
+501,7
@@
int notify_systemd (void)
return 0;
}
+ unsetenv ("NOTIFY_SOCKET");
close(fd);
return 1;
}