1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

Don't strdup an empty string

This commit is contained in:
Dan Fandrich 2007-09-27 18:39:10 +00:00
parent ad05b22de3
commit 0819c3a8cf

View File

@ -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
}