projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ad05b22
)
Don't strdup an empty string
author
Dan Fandrich
<dan@coneharvesters.com>
Thu, 27 Sep 2007 18:39:10 +0000
(18:39 +0000)
committer
Dan Fandrich
<dan@coneharvesters.com>
Thu, 27 Sep 2007 18:39:10 +0000
(18:39 +0000)
lib/getenv.c
patch
|
blob
|
history
diff --git
a/lib/getenv.c
b/lib/getenv.c
index
475c3d3
..
ca88234
100644
(file)
--- 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
}