Commit 2c13f3b
selftests/bpf: test_xsk: fix memory leak in testapp_xdp_shared_umem()
testapp_xdp_shared_umem() generates pkt_stream on each xsk from xsk_arr,
where normally xsk_arr[0] gets pkt_streams and xsk_arr[1] have them NULLed.
At the end of the test pkt_stream_restore_default() only releases
xsk_arr[0] which leads to memory leaks.
Release the missing pkt_stream at the end of testapp_xdp_shared_umem()
Reviewed-by: Maciej Fijalkowski <[email protected]>
Signed-off-by: Bastien Curutchet (eBPF Foundation) <[email protected]>1 parent c28eded commit 2c13f3b
1 file changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
573 | 589 | | |
574 | 590 | | |
575 | 591 | | |
| |||
2043 | 2059 | | |
2044 | 2060 | | |
2045 | 2061 | | |
| 2062 | + | |
2046 | 2063 | | |
2047 | 2064 | | |
2048 | 2065 | | |
| |||
2053 | 2070 | | |
2054 | 2071 | | |
2055 | 2072 | | |
2056 | | - | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
| 2077 | + | |
2057 | 2078 | | |
2058 | 2079 | | |
2059 | 2080 | | |
| |||
0 commit comments