summaryrefslogtreecommitdiff
path: root/src/setproctitle.c
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-02-26 15:51:15 +0100
committerantirez <antirez@gmail.com>2013-02-26 15:51:33 +0100
commitdeb1f4d841d402508d27a5bda0bf3a7c19cc0a6d (patch)
treec548cc6ca93fbfdc121278d850fc7db03983c8e1 /src/setproctitle.c
parentd0992d6e8b883d6f04fa4da21611180766fd8df7 (diff)
downloadredis-deb1f4d841d402508d27a5bda0bf3a7c19cc0a6d.tar.gz
setproctitle.c: declar tmp as static so valgrind will not detect a leak.
Diffstat (limited to 'src/setproctitle.c')
-rw-r--r--src/setproctitle.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/setproctitle.c b/src/setproctitle.c
index 399205c06..99bccf2c0 100644
--- a/src/setproctitle.c
+++ b/src/setproctitle.c
@@ -80,7 +80,7 @@ static int spt_clearenv(void) {
return 0;
#else
extern char **environ;
- char **tmp;
+ static char **tmp;
if (!(tmp = malloc(sizeof *tmp)))
return errno;