aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorPatrick Monnerat <pm@datasphere.ch>2013-07-15 16:53:43 +0200
committerPatrick Monnerat <pm@datasphere.ch>2013-07-15 16:53:43 +0200
commit964a7600b98dbdd4f03205b17ef93ef7850186fe (patch)
treef1e0ae785d5f39bb914e434e523f3320519099e6 /lib/cookie.c
parent9c15325d34798501266146dffc2bfbe7cb788102 (diff)
slist.c, slist.h, cookie.c: new internal procedure Curl_slist_append_nodup()
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index fc918136a..b6790677f 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -89,6 +89,7 @@ Example set of cookies:
#include "strequal.h"
#include "strtok.h"
#include "sendf.h"
+#include "slist.h"
#include "curl_memory.h"
#include "share.h"
#include "strtoofft.h"
@@ -1232,9 +1233,9 @@ struct curl_slist *Curl_cookie_list(struct SessionHandle *data)
curl_slist_free_all(list);
return NULL;
}
- beg = curl_slist_append(list, line);
- free(line);
+ beg = Curl_slist_append_nodup(list, line);
if(!beg) {
+ free(line);
curl_slist_free_all(list);
return NULL;
}