1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -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) if (env && strcmp("HOME",variable) == 0)
env = decc$translate_vms(env); env = decc$translate_vms(env);
#endif #endif
return env?strdup(env):NULL; return (env && env[0])?strdup(env):NULL;
#endif #endif
#endif #endif
} }