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:
parent
ad05b22de3
commit
0819c3a8cf
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user