mirror of
https://github.com/curl/curl.git
synced 2026-05-16 18:26:25 +03:00
Fixed an OOM memory leak in the FTP wildcard code
This commit is contained in:
parent
d63bdba097
commit
bd6a695545
1 changed files with 3 additions and 1 deletions
|
|
@ -3526,8 +3526,10 @@ static CURLcode init_wc_data(struct connectdata *conn)
|
|||
|
||||
/* INITIALIZE parselist structure */
|
||||
ftp_tmp->parser = Curl_ftp_parselist_data_alloc();
|
||||
if(!ftp_tmp->parser)
|
||||
if(!ftp_tmp->parser) {
|
||||
free(ftp_tmp);
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
wildcard->tmp = ftp_tmp; /* put it to the WildcardData tmp pointer */
|
||||
wildcard->tmp_dtor = wc_data_dtor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue