Skip to content

Commit c50cc2f

Browse files
Yihao HanNobody
authored andcommitted
bpf: test_run: use kvfree() for memory allocated with kvmalloc()
It is allocated with kvmalloc(), the corresponding release function should not be kfree(), use vfree() instead. Generated by: scripts/coccinelle/api/kfree_mismatch.cocci Signed-off-by: Yihao Han <[email protected]>
1 parent e421ca6 commit c50cc2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/bpf/test_run.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ static int xdp_test_run_setup(struct xdp_test_data *xdp, struct xdp_buff *orig_c
196196
err_mmodel:
197197
page_pool_destroy(pp);
198198
err_pp:
199-
kfree(xdp->skbs);
199+
kvfree(xdp->skbs);
200200
err_skbs:
201-
kfree(xdp->frames);
201+
kvfree(xdp->frames);
202202
return err;
203203
}
204204

0 commit comments

Comments
 (0)