[PATCH 04/13] net/idpf: add queue operations
Guo, Junfeng
junfeng.guo at intel.com
Mon Aug 8 06:44:02 CEST 2022
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, August 3, 2022 23:16
> To: Guo, Junfeng <junfeng.guo at intel.com>
> Cc: Zhang, Qi Z <qi.z.zhang at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>; Xing, Beilei <beilei.xing at intel.com>;
> dev at dpdk.org; Li, Xiaoyun <xiaoyun.li at intel.com>
> Subject: Re: [PATCH 04/13] net/idpf: add queue operations
>
> 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.
Thanks for your review! Will refine this in the patchset of upcoming version.
>
> There is even a script used to scan DPDK to fix this.
> devtools/cocci/nullfree.cocci
More information about the dev
mailing list