From: Yunjian Wang Date: Fri, 9 Oct 2020 12:39:05 +0000 (+0800) Subject: net/octeontx2: remove useless check before free X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=29892e064c1813927195fdbb7d80aede1ccd017d;p=dpdk.git net/octeontx2: remove useless check before free The glibc free allows free(NULL) as null operation, so remove this useless null checks. Coverity issue: 357719 Fixes: da138cd47e06 ("net/octeontx2: handle port reconfigure") Cc: stable@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Jerin Jacob --- diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 03d81faef1..b69b92bf58 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -1383,10 +1383,8 @@ nix_store_queue_cfg_and_then_release(struct rte_eth_dev *eth_dev) return 0; fail: - if (tx_qconf) - free(tx_qconf); - if (rx_qconf) - free(rx_qconf); + free(tx_qconf); + free(rx_qconf); return -ENOMEM; }