Curl_safefree(old_conn->proxyuser);
Curl_safefree(old_conn->proxypasswd);
+ if(old_conn->bits.rangestringalloc)
+ free(old_conn->range);
+
free(old_conn); /* we don't need this anymore */
/*
*/
conn->resume_from = data->set.set_resume_from;
if (conn->resume_from) {
- snprintf(resumerange, sizeof(resumerange), "%d-", conn->resume_from);
- if (conn->bits.rangestringalloc == TRUE)
- free(conn->range);
-
- /* tell ourselves to fetch this range */
- conn->range = strdup(resumerange);
- conn->bits.use_range = TRUE; /* enable range download */
- conn->bits.rangestringalloc = TRUE; /* mark range string allocated */
+ snprintf(resumerange, sizeof(resumerange), "%d-", conn->resume_from);
+ if (conn->bits.rangestringalloc == TRUE)
+ free(conn->range);
+
+ /* tell ourselves to fetch this range */
+ conn->range = strdup(resumerange);
+ conn->bits.use_range = TRUE; /* enable range download */
+ conn->bits.rangestringalloc = TRUE; /* mark range string allocated */
}
else if (data->set.set_range) {
/* There is a range, but is not a resume, useful for random ftp access */