linux/net/sctp
Jesper Juhl 9abed245a6 Fix memory leak in discard case of sctp_sf_abort_violation()
In net/sctp/sm_statefuns.c::sctp_sf_abort_violation() we may leak
the storage allocated for 'abort' by returning from the function
without using or freeing it. This happens in case
"sctp_auth_recv_cid(SCTP_CID_ABORT, asoc)" is true and we jump to
the 'discard' label.
Spotted by the Coverity checker.

The simple fix is to simply move the creation of the "abort chunk"
to after the possible jump to the 'discard' label. This way we don't
even have to allocate the memory at all in the problem case.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
2007-11-12 10:13:24 -05:00
..
associola.c
auth.c
bind_addr.c
chunk.c
command.c
crc32c.c
debug.c
endpointola.c
input.c
inqueue.c
ipv6.c
Kconfig
Makefile
objcnt.c
output.c
outqueue.c SCTP: Always flush the queue when uncorcking. 2007-11-09 11:43:41 -05:00
primitive.c
proc.c
protocol.c
sm_make_chunk.c
sm_sideeffect.c
sm_statefuns.c Fix memory leak in discard case of sctp_sf_abort_violation() 2007-11-12 10:13:24 -05:00
sm_statetable.c
socket.c
ssnmap.c
sysctl.c
transport.c
tsnmap.c
ulpevent.c
ulpqueue.c SCTP: Fix PR-SCTP to deliver all the accumulated ordered chunks 2007-11-09 11:43:41 -05:00