mirror of
https://github.com/curl/curl.git
synced 2025-02-17 14:59:45 +08:00
Fixed some memory leaks in the POP3 torture tests
This commit is contained in:
parent
1d26151d5f
commit
04cfef24a1
@ -828,7 +828,8 @@ static CURLcode pop3_disconnect(struct connectdata *conn)
|
|||||||
|
|
||||||
/* The POP3 session may or may not have been allocated/setup at this
|
/* The POP3 session may or may not have been allocated/setup at this
|
||||||
point! */
|
point! */
|
||||||
(void)pop3_quit(conn); /* ignore errors on the LOGOUT */
|
if(pop3c->pp.conn)
|
||||||
|
(void)pop3_quit(conn); /* ignore errors on the LOGOUT */
|
||||||
|
|
||||||
|
|
||||||
Curl_pp_disconnect(&pop3c->pp);
|
Curl_pp_disconnect(&pop3c->pp);
|
||||||
@ -849,10 +850,11 @@ static CURLcode pop3_parse_url_path(struct connectdata *conn)
|
|||||||
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
struct pop3_conn *pop3c = &conn->proto.pop3c;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
const char *path = data->state.path;
|
const char *path = data->state.path;
|
||||||
int len;
|
|
||||||
|
|
||||||
/* url decode the path and use this mailbox */
|
/* url decode the path and use this mailbox */
|
||||||
pop3c->mailbox = curl_easy_unescape(data, path, 0, &len);
|
pop3c->mailbox = curl_easy_unescape(data, path, 0, NULL);
|
||||||
|
if (!pop3c->mailbox)
|
||||||
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user