set rangestringalloc to 0 after the string has been freed to prevent it

from being freed twice (a NULL free the second time)
This commit is contained in:
Daniel Stenberg 2000-11-21 19:06:55 +00:00
Родитель 50d564b4d4
Коммит c938166520
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -191,6 +191,7 @@ void static urlfree(struct UrlData *data, bool totally)
if(data->bits.rangestringalloc) { if(data->bits.rangestringalloc) {
free(data->range); free(data->range);
data->range=NULL; data->range=NULL;
data->bits.rangestringalloc=0; /* free now */
} }
if(data->ptr_proxyuserpwd) { if(data->ptr_proxyuserpwd) {
@ -693,7 +694,7 @@ static CURLcode _connect(CURL *curl, CURLconnect **in_connect)
char *tmp; char *tmp;
char *buf; char *buf;
CURLcode result; CURLcode result;
char resumerange[12]=""; char resumerange[40]="";
struct UrlData *data = curl; struct UrlData *data = curl;
struct connectdata *conn; struct connectdata *conn;
#ifdef HAVE_SIGACTION #ifdef HAVE_SIGACTION