diff options
author | Yang Tse <yangsita@gmail.com> | 2007-10-02 19:19:47 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2007-10-02 19:19:47 +0000 |
commit | 08b9f7321992fd14dfe7dcd65e24069cc0ce3ed5 (patch) | |
tree | 354cb8d2a9196eac4cef5dd009712d7e6f425d3a /lib | |
parent | 94162d62aca15e3d900513a8f37bc84a12db5d16 (diff) |
Fix memory leak under low memory conditions.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1316,8 +1316,11 @@ static CURLcode ftp_state_post_listtype(struct connectdata *conn) lstArg? " ": "", lstArg? lstArg: "" ); - if(!cmd) + if(!cmd) { + if(lstArg) + free(lstArg); return CURLE_OUT_OF_MEMORY; + } NBFTPSENDF(conn, "%s",cmd); |