mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 06:34:12 +08:00
sctp: fix memleak in sctp_send_reset_streams
If the stream outq is not empty, need to kfree nstr_list.
Fixes: d570a59c5b
("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>
This commit is contained in:
parent
d00ee64e1d
commit
6d5afe2039
@ -316,6 +316,7 @@ int sctp_send_reset_streams(struct sctp_association *asoc,
|
||||
nstr_list[i] = htons(str_list[i]);
|
||||
|
||||
if (out && !sctp_stream_outq_is_empty(stream, str_nums, nstr_list)) {
|
||||
kfree(nstr_list);
|
||||
retval = -EAGAIN;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user