diff options
author | Matt Johnston <matt@ucc.asn.au> | 2007-02-03 09:42:22 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2007-02-03 09:42:22 +0000 |
commit | 85f22c9f098e853a6c6836d1af8afcee3ea6c4b7 (patch) | |
tree | 09fef14ebdf92fe1927824e0156195bbd3de4d6d | |
parent | 7eee3ceb7042dcdb7373373afaee8bfc0fe7c52f (diff) |
Fix free() of null pointer found by Klocwork
--HG--
extra : convert_revision : 8084d31816a059cc07c6180b6fd5aa86770845cb
-rw-r--r-- | svr-tcpfwd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svr-tcpfwd.c b/svr-tcpfwd.c index 6391c4c..0151ffe 100644 --- a/svr-tcpfwd.c +++ b/svr-tcpfwd.c @@ -216,8 +216,10 @@ 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 */ - m_free(tcpinfo->listenaddr); - m_free(tcpinfo); + if (tcpinfo) { + m_free(tcpinfo->listenaddr); + m_free(tcpinfo); + } } TRACE(("leave remotetcpreq")) return ret; |