Loading lib/url.c +7 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ void static urlfree(struct UrlData *data, bool totally) data->bits.httpproxy=FALSE; } if(data->bits.rangestringalloc) { free(data->range); data->range=NULL; } if(data->ptr_proxyuserpwd) { free(data->ptr_proxyuserpwd); data->ptr_proxyuserpwd=NULL; Loading Loading @@ -906,7 +911,8 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect) if(!data->bits.set_range) { /* if it already was in use, we just skip this */ sprintf(resumerange, "%d-", data->resume_from); data->range=resumerange; /* tell ourselves to fetch this range */ data->range=strdup(resumerange); /* tell ourselves to fetch this range */ data->bits.rangestringalloc = TRUE; /* mark as allocated */ data->bits.set_range = 1; /* switch on range usage */ } } Loading lib/urldata.h +1 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,7 @@ struct Configbits { bool proxystringalloc; /* the http proxy string is malloc()'ed */ bool set_port; bool set_range; bool rangestringalloc; /* the range string is malloc()'ed */ bool upload; bool use_netrc; bool user_passwd; Loading Loading
lib/url.c +7 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,11 @@ void static urlfree(struct UrlData *data, bool totally) data->bits.httpproxy=FALSE; } if(data->bits.rangestringalloc) { free(data->range); data->range=NULL; } if(data->ptr_proxyuserpwd) { free(data->ptr_proxyuserpwd); data->ptr_proxyuserpwd=NULL; Loading Loading @@ -906,7 +911,8 @@ CURLcode curl_connect(CURL *curl, CURLconnect **in_connect) if(!data->bits.set_range) { /* if it already was in use, we just skip this */ sprintf(resumerange, "%d-", data->resume_from); data->range=resumerange; /* tell ourselves to fetch this range */ data->range=strdup(resumerange); /* tell ourselves to fetch this range */ data->bits.rangestringalloc = TRUE; /* mark as allocated */ data->bits.set_range = 1; /* switch on range usage */ } } Loading
lib/urldata.h +1 −0 Original line number Diff line number Diff line Loading @@ -307,6 +307,7 @@ struct Configbits { bool proxystringalloc; /* the http proxy string is malloc()'ed */ bool set_port; bool set_range; bool rangestringalloc; /* the range string is malloc()'ed */ bool upload; bool use_netrc; bool user_passwd; Loading