aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-01-24 11:13:59 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-01-24 11:13:59 +0000
commit2b054e53099fdd44f67eb84dc44b546f03a89528 (patch)
treedc3a6e5ce9a8fd2551e3a9ae5f1624eb19711312 /lib
parenta302ff1605daa452287cdcb789c4b533d9bad598 (diff)
Bertrand Demiddelaer found and fixed this memory leak.
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index b860805c6..6085cb45b 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -573,6 +573,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
end++, len++);
/* allocate memory of a cloned copy */
+ if(data->info.contenttype)
+ free(data->info.contenttype);
+
data->info.contenttype = malloc(len + 1);
if (NULL == data->info.contenttype)
return CURLE_OUT_OF_MEMORY;