Skip to content
Commit 418c96ac authored by Leon Yu's avatar Leon Yu Committed by David S. Miller
Browse files

net: filter: fix possible memory leak in __sk_prepare_filter()



__sk_prepare_filter() was reworked in commit bd4cf0ed (net: filter:
rework/optimize internal BPF interpreter's instruction set) so that it should
have uncharged memory once things went wrong. However that work isn't complete.
Error is handled only in __sk_migrate_filter() while memory can still leak in
the error path right after sk_chk_filter().

Fixes: bd4cf0ed ("net: filter: rework/optimize internal BPF interpreter's instruction set")
Signed-off-by: default avatarLeon Yu <chianglungyu@gmail.com>
Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Tested-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3aab01d8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment