net/af_packet: fix check of file descriptors
authorYunjian Wang <wangyunjian@huawei.com>
Mon, 6 Jul 2020 12:27:32 +0000 (20:27 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jul 2020 16:21:21 +0000 (18:21 +0200)
commitc6d1a552a8798df02bf85627c5d47a28ccdc62f8
tree41fa978333539dfe46d01e0c76c6038f95422802
parent2dd4f08540cc32cc1a62579d66d055327638ac92
net/af_packet: fix check of file descriptors

Zero is a valid fd. It will fail to check the fd if the fd is zero.

Fixes: 527740ccfaec ("af_packet: fix some leaks")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c