1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

fixed strdup() of a NULL pointer

This commit is contained in:
Daniel Stenberg 2000-11-17 15:32:17 +00:00
parent 3e6a354c4c
commit 0a72154cd2

View File

@ -365,7 +365,6 @@ static char *my_get_token(const char *line);
static void GetStr(char **string,
char *value)
{
fprintf(stderr, "called\n");
if(*string)
free(*string);
if(value && *value)
@ -1404,7 +1403,7 @@ int main(int argc, char *argv[])
return res;
/* save outfile pattern befor expansion */
outfiles = strdup(config.outfile);
outfiles = config.outfile?strdup(config.outfile):NULL;
if (!outfiles && !config.remotefile && urlnum > 1) {
#ifdef CURL_SEPARATORS