> -Original Message-
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Tuesday, March 10, 2015 6:20 PM
> To: Ouyang, Changchun
> Cc: dev at dpdk.org; Wodkowski, PawelX
> Subject: Re: [dpdk-dev] [PATCH v6] af_packet: Fix some klocwork errors
>
Fix possible memory leak issue: free kvlist before return;
Fix possible resource lost issue: close qssockfd before return;
Signed-off-by: Changchun Ouyang
---
Change in v6:
- Refine exit point;
Change in v5:
- Initialize qsockfd with -1;
Change in v4:
- Check sockfd in
2015-03-10 08:49, Ouyang, Changchun:
> From: Wodkowski, PawelX
> > > + if (kvlist != NULL)
> >
> > No need for if(). This part was fine previous patch.
> >
>
> If kvlist is NULL, no reason to call rte_kvargs_free to free it.
> So, adding this test is better.
No, we don't need to double check.
On 2015-03-10 09:49, Ouyang, Changchun wrote:
>
>
>> -Original Message-
>> From: Wodkowski, PawelX
>> Sent: Tuesday, March 10, 2015 4:37 PM
>> To: Ouyang, Changchun; dev at dpdk.org
>> Cc: linville at tuxdriver.com; nhorman at tuxdriver.com
>> Subject: Re: [PATCH v6] af_packet: Fix some
> -
> - return 0;
> +exit:
> + if (kvlist != NULL)
No need for if(). This part was fine previous patch.
> + rte_kvargs_free(kvlist);
> + return ret;
> }
>
> static struct rte_driver pmd_af_packet_drv = {
>
--
Pawel
> -Original Message-
> From: Wodkowski, PawelX
> Sent: Tuesday, March 10, 2015 4:37 PM
> To: Ouyang, Changchun; dev at dpdk.org
> Cc: linville at tuxdriver.com; nhorman at tuxdriver.com
> Subject: Re: [PATCH v6] af_packet: Fix some klocwork errors
>
> > -
> > - return 0;
> > +exit:
>
6 matches
Mail list logo