Skip to content

Commit a786229

Browse files
GustavoARSilvaborkmann
authored andcommitted
bpf: sockmap, fix double-free
`e' is being freed twice. Fix this by removing one of the kfree() calls. Addresses-Coverity-ID: 1468983 ("Double free") Fixes: 8111038 ("bpf: sockmap, add hash map support") Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
1 parent 0e43645 commit a786229

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎kernel/bpf/sockmap.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1823,7 +1823,6 @@ static int __sock_map_ctx_update_elem(struct bpf_map *map,
18231823
write_unlock_bh(&sock->sk_callback_lock);
18241824
return err;
18251825
out_free:
1826-
kfree(e);
18271826
smap_release_sock(psock, sock);
18281827
out_progs:
18291828
if (verdict)

0 commit comments

Comments
 (0)