[PATCH 04/13] net/idpf: add queue operations
Stephen Hemminger
stephen at networkplumber.org
Wed Aug 3 17:16:06 CEST 2022
On Wed, 3 Aug 2022 19:30:55 +0800
Junfeng Guo <junfeng.guo at intel.com> 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
More information about the dev
mailing list