From: Daniel Stenberg Date: Tue, 21 Nov 2000 19:06:55 +0000 (+0000) Subject: set rangestringalloc to 0 after the string has been freed to prevent it X-Git-Tag: curl-7_5~61 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c93816652081a39f2e8eabce9bdb0d32aa82a455;p=curl set rangestringalloc to 0 after the string has been freed to prevent it from being freed twice (a NULL free the second time) --- diff --git a/lib/url.c b/lib/url.c index a88d1a214..878aee1f6 100644 --- a/lib/url.c +++ b/lib/url.c @@ -191,6 +191,7 @@ void static urlfree(struct UrlData *data, bool totally) if(data->bits.rangestringalloc) { free(data->range); data->range=NULL; + data->bits.rangestringalloc=0; /* free now */ } if(data->ptr_proxyuserpwd) { @@ -693,7 +694,7 @@ static CURLcode _connect(CURL *curl, CURLconnect **in_connect) char *tmp; char *buf; CURLcode result; - char resumerange[12]=""; + char resumerange[40]=""; struct UrlData *data = curl; struct connectdata *conn; #ifdef HAVE_SIGACTION