mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
Fix memory leak under low memory conditions.
This commit is contained in:
parent
94162d62ac
commit
08b9f73219
@ -1316,8 +1316,11 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn)
|
|||||||
lstArg? " ": "",
|
lstArg? " ": "",
|
||||||
lstArg? lstArg: "" );
|
lstArg? lstArg: "" );
|
||||||
|
|
||||||
if(!cmd)
|
if(!cmd) {
|
||||||
|
if(lstArg)
|
||||||
|
free(lstArg);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
}
|
||||||
|
|
||||||
NBFTPSENDF(conn, "%s",cmd);
|
NBFTPSENDF(conn, "%s",cmd);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user