xwhuang / sctp-refimpl

Automatically exported from code.google.com/p/sctp-refimpl
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Memory leak: usrsctp_conninput doesn't free mbuf *m #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is a memory leak in usrsctp/usrsctplib/user_socket.c in function 
usrsctp_conninput
The memory allocated here:
"if ((m = sctp_get_mbuf_for_msg(length, 1, M_NOWAIT, 0, MT_DATA)) == NULL)" 
(line 3200 in current rev)
is never released

I think a simple sctp_m_freem before the return would fix it, but I'm not very 
familiar with the code

Original issue reported on code.google.com by ndimit...@setelis.com on 6 Jan 2014 at 3:32

GoogleCodeExporter commented 9 years ago
It is fixed in the new revisions, sorry about the wrong report

Original comment by ndimit...@setelis.com on 6 Jan 2014 at 3:53

GoogleCodeExporter commented 9 years ago

Original comment by t00FC...@googlemail.com on 2 Jul 2014 at 3:32