Skip to content

Commit 29fdb11

Browse files
seehearfeelgregkh
authored andcommitted
bpf, s390: Fix potential memory leak about jit_data
[ Upstream commit 686cb8b ] 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 <yangtiezhu@loongson.cn> Acked-by: Ilya Leoshkevich <iii@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 2c152d9 commit 29fdb11

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/s390/net/bpf_jit_comp.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1775,7 +1775,7 @@ struct bpf_prog *bpf_int_jit_compile(struct bpf_prog *fp)
17751775
jit.addrs = kvcalloc(fp->len + 1, sizeof(*jit.addrs), GFP_KERNEL);
17761776
if (jit.addrs == NULL) {
17771777
fp = orig_fp;
1778-
goto out;
1778+
goto free_addrs;
17791779
}
17801780
/*
17811781
* Three initial passes:

0 commit comments

Comments
 (0)