mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:43:32 +03:00
slist.c, slist.h, cookie.c: new internal procedure Curl_slist_append_nodup()
This commit is contained in:
parent
9c15325d34
commit
964a7600b9
3 changed files with 51 additions and 26 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue