From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v7] af_packet: Fix some klocwork errors Date: Tue, 17 Mar 2015 22:34:44 +0100 Message-ID: <1729896.h2YfPhv0FY@xps13> References: <1425958188-25041-1-git-send-email-changchun.ouyang@intel.com> <20150312133846.GA15260@hmsreliant.think-freely.org> <20150312170919.GA19053@tuxdriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <20150312170919.GA19053-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > > > > 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 > > Acked-by: John W. Linville Applied, thanks