diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-09-27 18:39:10 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-09-27 18:39:10 +0000 |
commit | 0819c3a8cfe3e56bb6a4b38fcbeb15ae2c5cb92f (patch) | |
tree | 6ba62a8914a223f70d5260f575465fa024e06ca0 /lib/getenv.c | |
parent | ad05b22de350f87f295a09fb6e0745b91216aa21 (diff) | |
download | curl-0819c3a8cfe3e56bb6a4b38fcbeb15ae2c5cb92f.tar.gz |
Don't strdup an empty string
Diffstat (limited to 'lib/getenv.c')
-rw-r--r-- | lib/getenv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/getenv.c b/lib/getenv.c index 475c3d3ca..ca88234fa 100644 --- a/lib/getenv.c +++ b/lib/getenv.c @@ -55,7 +55,7 @@ char *GetEnv(const char *variable) if (env && strcmp("HOME",variable) == 0) env = decc$translate_vms(env); #endif - return env?strdup(env):NULL; + return (env && env[0])?strdup(env):NULL; #endif #endif } |