Fix resource leak in load_cookies
This commit is contained in:
committed by
Tatsuya Kinoshita
parent
4086117d9c
commit
80b38e6bc3
20
cookie.c
20
cookie.c
@@ -518,36 +518,36 @@ load_cookies(void)
|
|||||||
cookie->commentURL = NULL;
|
cookie->commentURL = NULL;
|
||||||
parseURL(readcol(&str)->ptr, &cookie->url, NULL);
|
parseURL(readcol(&str)->ptr, &cookie->url, NULL);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->name = readcol(&str);
|
cookie->name = readcol(&str);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->value = readcol(&str);
|
cookie->value = readcol(&str);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->expires = (time_t) atol(readcol(&str)->ptr);
|
cookie->expires = (time_t) atol(readcol(&str)->ptr);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->domain = readcol(&str);
|
cookie->domain = readcol(&str);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->path = readcol(&str);
|
cookie->path = readcol(&str);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->flag = atoi(readcol(&str)->ptr);
|
cookie->flag = atoi(readcol(&str)->ptr);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->version = atoi(readcol(&str)->ptr);
|
cookie->version = atoi(readcol(&str)->ptr);
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->comment = readcol(&str);
|
cookie->comment = readcol(&str);
|
||||||
if (cookie->comment->length == 0)
|
if (cookie->comment->length == 0)
|
||||||
cookie->comment = NULL;
|
cookie->comment = NULL;
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->portl = make_portlist(readcol(&str));
|
cookie->portl = make_portlist(readcol(&str));
|
||||||
if (!*str)
|
if (!*str)
|
||||||
return;
|
break;
|
||||||
cookie->commentURL = readcol(&str);
|
cookie->commentURL = readcol(&str);
|
||||||
if (cookie->commentURL->length == 0)
|
if (cookie->commentURL->length == 0)
|
||||||
cookie->commentURL = NULL;
|
cookie->commentURL = NULL;
|
||||||
|
Reference in New Issue
Block a user