aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2007-04-27 08:30:48 +0000
committerDaniel Stenberg <daniel@haxx.se>2007-04-27 08:30:48 +0000
commit7a0e0c36c549218f74ac5f1d4b679667135a97da (patch)
treeb52021b0a73cd878f45c0c0a65b4a8bcdeea0ac0
parent61edee979f2e34a3957da65f6329d5c24a47fc72 (diff)
Move the explictit free of the range string to Curl_close() from Curl_disconnect()
since it easy-handle related and not connection-related.
-rw-r--r--lib/url.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/url.c b/lib/url.c
index 77fc67173..6611486a0 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -310,6 +310,9 @@ CURLcode Curl_close(struct SessionHandle *data)
}
}
+ if(data->reqdata.rangestringalloc)
+ free(data->reqdata.range);
+
/* Free the pathbuffer */
Curl_safefree(data->reqdata.pathbuffer);
Curl_safefree(data->reqdata.proto.generic);
@@ -1827,12 +1830,6 @@ CURLcode Curl_disconnect(struct connectdata *conn)
NULL, Curl_scan_cache_used);
#endif
- /* cleanups done even if the connection is re-used */
- if(data->reqdata.rangestringalloc) {
- free(data->reqdata.range);
- data->reqdata.rangestringalloc = FALSE;
- }
-
Curl_expire(data, 0); /* shut off timers */
Curl_hostcache_prune(data); /* kill old DNS cache entries */