]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
selftests/xsk: Fix double free
authorMagnus Karlsson <magnus.karlsson@intel.com>
Thu, 29 Sep 2022 09:01:33 +0000 (11:01 +0200)
committerAndrii Nakryiko <andrii@kernel.org>
Fri, 30 Sep 2022 22:42:37 +0000 (15:42 -0700)
Fix a double free at exit of the test suite.

Fixes: a693ff3ed561 ("selftests/xsk: Add support for executing tests on physical device")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Link: https://lore.kernel.org/bpf/20220929090133.7869-1-magnus.karlsson@gmail.com
tools/testing/selftests/bpf/xskxceiver.c

index ef33309bbe491160649949bcf1be48dd1e53dcae..d1a5f3218c345c4e6f57139db3502e22b9670d4c 100644 (file)
@@ -1953,9 +1953,6 @@ int main(int argc, char **argv)
 
        pkt_stream_delete(tx_pkt_stream_default);
        pkt_stream_delete(rx_pkt_stream_default);
-       free(ifobj_rx->umem);
-       if (!ifobj_tx->shared_umem)
-               free(ifobj_tx->umem);
        ifobject_delete(ifobj_tx);
        ifobject_delete(ifobj_rx);