summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2b4da1f)
raw | patch | inline | side by side (parent: 2b4da1f)
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.
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 df238e710ad532f686f60764b4f10abf416fb6ce..fc52933111e79fec0c291d115618d4b57f6032e5 100644 (file)
--- a/src/daemon/collectd.c
+++ b/src/daemon/collectd.c
return 0;
}
+ unsetenv ("NOTIFY_SOCKET");
close(fd);
return 1;
}