Fix free() of null pointer found by Klocwork

--HG--
extra : convert_revision : 8084d31816a059cc07c6180b6fd5aa86770845cb
This commit is contained in:
Matt Johnston 2007-02-03 09:42:22 +00:00
parent 7eee3ceb70
commit 85f22c9f09

View File

@ -216,9 +216,11 @@ out:
if (ret == DROPBEAR_FAILURE) {
/* we only free it if a listener wasn't created, since the listener
* has to remember it if it's to be cancelled */
if (tcpinfo) {
m_free(tcpinfo->listenaddr);
m_free(tcpinfo);
}
}
TRACE(("leave remotetcpreq"))
return ret;
}