Mercurial > dropbear
comparison svr-tcpfwd.c @ 619:35d27c1d0ee7
Fix leak found by Klocwork
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 07 Apr 2011 13:38:27 +0000 |
parents | 69e98c45db7c |
children | 79d48028457c |
comparison
equal
deleted
inserted
replaced
618:b5cc8878d5ec | 619:35d27c1d0ee7 |
---|---|
211 tcpinfo->tcp_type = forwarded; | 211 tcpinfo->tcp_type = forwarded; |
212 | 212 |
213 if (!opts.listen_fwd_all | 213 if (!opts.listen_fwd_all |
214 || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) { | 214 || (strcmp(tcpinfo->listenaddr, "localhost") == 0) ) { |
215 // NULL means "localhost only" | 215 // NULL means "localhost only" |
216 tcpinfo->listenaddr = NULL; | 216 m_free(bindaddr); |
217 } | 217 bindaddr = NULL; |
218 else | 218 } |
219 { | 219 tcpinfo->listenaddr = bindaddr; |
220 tcpinfo->listenaddr = bindaddr; | |
221 } | |
222 | 220 |
223 ret = listen_tcpfwd(tcpinfo); | 221 ret = listen_tcpfwd(tcpinfo); |
224 | 222 |
225 out: | 223 out: |
226 if (ret == DROPBEAR_FAILURE) { | 224 if (ret == DROPBEAR_FAILURE) { |