Skip to content
Snippets Groups Projects
Commit 85f22c9f authored by Matt Johnston's avatar Matt Johnston
Browse files

Fix free() of null pointer found by Klocwork

--HG--
extra : convert_revision : 8084d31816a059cc07c6180b6fd5aa86770845cb
parent 7eee3ceb
No related merge requests found
...@@ -216,8 +216,10 @@ out: ...@@ -216,8 +216,10 @@ out:
if (ret == DROPBEAR_FAILURE) { if (ret == DROPBEAR_FAILURE) {
/* we only free it if a listener wasn't created, since the listener /* we only free it if a listener wasn't created, since the listener
* has to remember it if it's to be cancelled */ * has to remember it if it's to be cancelled */
m_free(tcpinfo->listenaddr); if (tcpinfo) {
m_free(tcpinfo); m_free(tcpinfo->listenaddr);
m_free(tcpinfo);
}
} }
TRACE(("leave remotetcpreq")) TRACE(("leave remotetcpreq"))
return ret; return ret;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment