> -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: Wednesday, August 3, 2022 23:16 > To: Guo, Junfeng <junfeng....@intel.com> > Cc: Zhang, Qi Z <qi.z.zh...@intel.com>; Wu, Jingjing > <jingjing...@intel.com>; Xing, Beilei <beilei.x...@intel.com>; > dev@dpdk.org; Li, Xiaoyun <xiaoyun...@intel.com> > Subject: Re: [PATCH 04/13] net/idpf: add queue operations > > On Wed, 3 Aug 2022 19:30:55 +0800 > Junfeng Guo <junfeng....@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
- [PATCH 00/13] add support for idpf PMD in DPDK Junfeng Guo
- [PATCH 02/13] net/idpf/base: add logs and OS specif... Junfeng Guo
- [PATCH 03/13] net/idpf: support device initializati... Junfeng Guo
- Re: [PATCH 03/13] net/idpf: support device init... Stephen Hemminger
- RE: [PATCH 03/13] net/idpf: support device ... Guo, Junfeng
- [PATCH 04/13] net/idpf: add queue operations Junfeng Guo
- Re: [PATCH 04/13] net/idpf: add queue operation... Stephen Hemminger
- RE: [PATCH 04/13] net/idpf: add queue opera... Guo, Junfeng
- [PATCH 05/13] net/idpf: add support to get device i... Junfeng Guo
- [PATCH 06/13] net/idpf: add support to get packet t... Junfeng Guo
- [PATCH 07/13] net/idpf: add support to update link ... Junfeng Guo
- [PATCH 08/13] net/idpf: add basic Rx/Tx datapath Junfeng Guo
- [PATCH 09/13] net/idpf: add support for RSS Junfeng Guo
- [PATCH 10/13] net/idpf: add mtu configuration Junfeng Guo
- [PATCH 11/13] net/idpf: add hw statistics Junfeng Guo
- [PATCH 12/13] net/idpf: support write back based on... Junfeng Guo
- [PATCH 13/13] net/idpf: add AVX512 data path for si... Junfeng Guo
- [PATCH v2 00/14] add support for idpf PMD in DPDK Junfeng Guo