Skip to content

Commit 686cb8b

Browse files
seehearfeelVasily Gorbik
authored andcommitted
bpf, s390: Fix potential memory leak about jit_data
Make sure to free jit_data through kfree() in the error path. Fixes: 1c8f9b9 ("bpf: s390: add JIT support for multi-function programs") Signed-off-by: Tiezhu Yang <[email protected]> Acked-by: Ilya Leoshkevich <[email protected]> Reviewed-by: Christian Borntraeger <[email protected]> Signed-off-by: Christian Borntraeger <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
1 parent 9e1ff30 commit 686cb8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/s390/net/bpf_jit_comp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1826,7 +1826,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
18261826
jit.addrs = kvcalloc(fp->len + 1, sizeof(*jit.addrs), GFP_KERNEL);
18271827
if (jit.addrs == NULL) {
18281828
fp = orig_fp;
1829-
goto out;
1829+
goto free_addrs;
18301830
}
18311831
/*
18321832
* Three initial passes:

0 commit comments

Comments
 (0)