projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e399502
)
make sure we free rangeline before we re-assign it to a new allocated
author
Daniel Stenberg
<daniel@haxx.se>
Wed, 25 Sep 2002 12:47:38 +0000
(12:47 +0000)
committer
Daniel Stenberg
<daniel@haxx.se>
Wed, 25 Sep 2002 12:47:38 +0000
(12:47 +0000)
memory as otherwise we (might) leak memory
lib/http.c
patch
|
blob
|
history
diff --git
a/lib/http.c
b/lib/http.c
index 855d74733a1f2eba2f803f58626f3c919702eacd..6bba43dda4684d2c86ac543e2fe5f085e9997b30 100644
(file)
--- a/
lib/http.c
+++ b/
lib/http.c
@@
-669,6
+669,9
@@
CURLcode Curl_http(struct connectdata *conn)
*/
if((data->set.httpreq == HTTPREQ_GET) &&
!checkheaders(data, "Range:")) {
+ /* if a line like this was already allocated, free the previous one */
+ if(conn->allocptr.rangeline)
+ free(conn->allocptr.rangeline);
conn->allocptr.rangeline = aprintf("Range: bytes=%s\r\n", conn->range);
}
else if((data->set.httpreq != HTTPREQ_GET) &&