mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Don't strdup an empty string
This commit is contained in:
parent
ad05b22de3
commit
0819c3a8cf
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user