diff options
author | Stef Walter <stef@memberwebs.com> | 2005-09-08 00:22:35 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2005-09-08 00:22:35 +0000 |
commit | f2de0ff5f1ae1cadf8693d91a3e323df8900a346 (patch) | |
tree | c585e14824c7444670b6e1fe753309a7cef1f12c /common/compat.c | |
parent | 7444a80a8a429637908c4b34a88c0a926770f167 (diff) |
Don't free variables put in through putenv
Diffstat (limited to 'common/compat.c')
-rw-r--r-- | common/compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/compat.c b/common/compat.c index 1f1736b..9828a41 100644 --- a/common/compat.c +++ b/common/compat.c @@ -193,7 +193,8 @@ int setenv(const char* name, const char* value, int overwrite) if(!t) return -1; sprintf(t, "%s=%s", name, value); r = putenv(t); - free(t); + if(r != 0) + free(t); return r; } |