]> git.ipfire.org Git - thirdparty/linux.git/commit
sctp: fix memleak in sctp_send_reset_streams
authorzhengbin <zhengbin13@huawei.com>
Tue, 13 Aug 2019 14:05:50 +0000 (22:05 +0800)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 14 Aug 2019 03:45:01 +0000 (20:45 -0700)
commit6d5afe20397b478192ed8c38ec0ee10fa3aec649
treef6a5230b5b9e1db18a87a04dff665fcc961a5e53
parentd00ee64e1dcf09b3afefd1340f3e9eb637272714
sctp: fix memleak in sctp_send_reset_streams

If the stream outq is not empty, need to kfree nstr_list.

Fixes: d570a59c5b5f ("sctp: only allow the out stream reset when the stream outq is empty")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/sctp/stream.c