net/tap: fix memory leak when unregister intr handler
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 21 Jan 2020 02:12:43 +0000 (10:12 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 5 Feb 2020 08:51:19 +0000 (09:51 +0100)
commitc5f9911d34650768355573bc53e0b621760c4124
tree788a455cec2f01a0797b7dfb80b8ee5b125d3092
parent25d22cd4f8d7f6d366c25bb565d5a11e7856f81b
net/tap: fix memory leak when unregister intr handler

The return check of function tap_lsc_intr_handle_set() is wrong, it should
be 0 or a positive number if success. So the intr_handle->intr_vec was not
been freed when tap_lsc_intr_handle_set() returned a positive number.

Fixes: 4870a8cdd968 ("net/tap: support Rx interrupt")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/tap/rte_eth_tap.c