diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-08 03:02:18 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2013-02-08 03:02:18 +0000 |
commit | 223adf17682765f9e72d3436348700085d823a6e (patch) | |
tree | 8291986e487516d04bd17f6001c8a74a0954cfce | |
parent | d8ac1b937647b86342135a91abe933a3f8812909 (diff) | |
download | cmogstored-223adf17682765f9e72d3436348700085d823a6e.tar.gz |
Having a NULL at the beginning of the list caused iteration in the destructor to stop, allowing valgrind to detect a memory leak.
-rw-r--r-- | upgrade.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -49,7 +49,7 @@ void mog_upgrade_prepare(int argc, char *argv[], char *envp[]) /* duplicate envp */ e = start.envp; - *e++ = NULL; /* save this slot for CMOGSTORED_FD */ + *e++ = xstrdup(FD_PFX); /* placeholder */ for (; *envp; envp++) { if (strncmp(*envp, FD_PFX, strlen(FD_PFX))) *e++ = xstrdup(*envp); |