aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-11 14:53:24 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-11 14:53:24 +0000
commit853134017dddd66bf75eebb64cfa50b2f19a713f (patch)
tree62984aae7510407987fd6da01f32caf122087aa6 /lib
parentd3999e06d199a2538db69536bd9266666180ed68 (diff)
minor leak in case of error, thanks to "./runtests.pl -n -t 25"
Diffstat (limited to 'lib')
-rw-r--r--lib/transfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 1371e8de5..2f80909f4 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1777,8 +1777,10 @@ CURLcode Curl_follow(struct SessionHandle *data,
newest=(char *)malloc( urllen + 1 + /* possible slash */
newlen + 1 /* zero byte */);
- if(!newest)
+ if(!newest) {
+ free(url_clone); /* don't leak this */
return CURLE_OUT_OF_MEMORY; /* go out from this */
+ }
/* copy over the root url part */
memcpy(newest, url_clone, urllen);