From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id 243D75952 for ; Thu, 12 Mar 2015 14:38:56 +0100 (CET) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1YW3K3-0007zI-O8; Thu, 12 Mar 2015 09:38:53 -0400 Date: Thu, 12 Mar 2015 09:38:46 -0400 From: Neil Horman To: "Qiu, Michael" Message-ID: <20150312133846.GA15260@hmsreliant.think-freely.org> References: <1425958188-25041-1-git-send-email-changchun.ouyang@intel.com> <1426037641-4515-1-git-send-email-changchun.ouyang@intel.com> <533710CFB86FA344BFBF2D6802E60286D02B43@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <533710CFB86FA344BFBF2D6802E60286D02B43@SHSMSX101.ccr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Score: -2.9 (--) X-Spam-Status: No Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v7] af_packet: Fix some klocwork errors X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Mar 2015 13:38:56 -0000 On Thu, Mar 12, 2015 at 10:43:24AM +0000, Qiu, Michael wrote: > On 3/11/2015 9:34 AM, Ouyang Changchun wrote: > > 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 v7: > > - Remove unnecessary '!= NULL' check before freeing it; > > > > Change in v6: > > - Refine exit point; > > > > Change in v5: > > - Initialize qsockfd with -1; > > > > Change in v4: > > - Check sockfd in internals->rx_queue against 0; > > > > Change in v3: > > - Also close sockets for all queues; > > > > Change in v2: > > - Make the error exit point a common path. > > Acked-by: Michael Qiu Acked-by: Neil Horman