diff options
author | Marcelo Ricardo Leitner <[email protected]> | 2019-12-16 22:01:16 -0300 |
---|---|---|
committer | David S. Miller <[email protected]> | 2019-12-17 21:58:37 -0800 |
commit | 951c6db954a1adefab492f6da805decacabbd1a7 (patch) | |
tree | 4f10faba719c2bcb1c89d8a5cde985090036fb10 /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 040cda8a15210f19da7e29232c897ca6ca6cc950 (diff) |
sctp: fix memleak on err handling of stream initialization
syzbot reported a memory leak when an allocation fails within
genradix_prealloc() for output streams. That's because
genradix_prealloc() leaves initialized members initialized when the
issue happens and SCTP stack will abort the current initialization but
without cleaning up such members.
The fix here is to always call genradix_free() when genradix_prealloc()
fails, for output and also input streams, as it suffers from the same
issue.
Reported-by: [email protected]
Fixes: 2075e50caf5e ("sctp: convert to genradix")
Signed-off-by: Marcelo Ricardo Leitner <[email protected]>
Tested-by: Xin Long <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions