On Wed, 3 Aug 2022 19:30:55 +0800 Junfeng Guo <[email protected]> wrote:
> +static void
> +idpf_tx_queue_release(void *txq)
> +{
> + struct idpf_tx_queue *q = (struct idpf_tx_queue *)txq;
> +
> + if (!q)
> + return;
> +
> + if (q->complq)
> + rte_free(q->complq);
null pointer check before calling rte_free is unnecessary.
rte_free(NULL) works.
There is even a script used to scan DPDK to fix this.
devtools/cocci/nullfree.cocci

