aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 638ae9ec5..2a348b687 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -1500,8 +1500,10 @@ CURLcode Curl_follow(struct Curl_easy *data,
}
data->change.referer = strdup(data->change.url);
- if(!data->change.referer)
+ if(!data->change.referer) {
+ free(newurl);
return CURLE_OUT_OF_MEMORY;
+ }
data->change.referer_alloc = TRUE; /* yes, free this later */
}
}