slist.c, slist.h, cookie.c: new internal procedure Curl_slist_append_nodup()

This commit is contained in:
Patrick Monnerat 2013-07-15 16:53:43 +02:00
parent 9c15325d34
commit 964a7600b9
3 changed files with 51 additions and 26 deletions

View file

@ -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;
}