summaryrefslogtreecommitdiff
path: root/perl/Curl_easy/easy.xs
diff options
context:
space:
mode:
Diffstat (limited to 'perl/Curl_easy/easy.xs')
-rw-r--r--perl/Curl_easy/easy.xs5
1 files changed, 5 insertions, 0 deletions
diff --git a/perl/Curl_easy/easy.xs b/perl/Curl_easy/easy.xs
index 50b70280b..bcda42736 100644
--- a/perl/Curl_easy/easy.xs
+++ b/perl/Curl_easy/easy.xs
@@ -616,6 +616,11 @@ CODE:
case CURLOPT_POSTQUOTE:
slist = &postquote; break;
}
+ /* free any previous list */
+ if (*slist) {
+ curl_slist_free_all(*slist);
+ *slist=NULL;
+ }
/* ...store the values into it... */
for (;;) {
SV *sv = av_shift(array);