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

Return NULL if argument is NULL.

This commit is contained in:
Yang Tse 2006-07-17 15:25:37 +00:00
parent 9c83a20a27
commit f72c4e82fd

View File

@ -30,6 +30,9 @@ char *curlx_strdup(const char *str)
int len;
char *newstr;
if (!str)
return (char *)NULL;
len = strlen(str);
newstr = (char *) malloc((len+1)*sizeof(char));
if (!newstr)