]> granicus.if.org Git - curl/commitdiff
set rangestringalloc to 0 after the string has been freed to prevent it
authorDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 19:06:55 +0000 (19:06 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 21 Nov 2000 19:06:55 +0000 (19:06 +0000)
from being freed twice (a NULL free the second time)

lib/url.c

index a88d1a2143dfb1e5482d3f29b2c2b8dfc9cefc8f..878aee1f6435e607f96eb61d616a0da2523ba762 100644 (file)
--- 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