From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753073AbcKYV3c (ORCPT ); Fri, 25 Nov 2016 16:29:32 -0500 Received: from userp1040.oracle.com ([156.151.31.81]:18533 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751411AbcKYV3W (ORCPT ); Fri, 25 Nov 2016 16:29:22 -0500 Date: Sat, 26 Nov 2016 00:28:22 +0300 From: Dan Carpenter To: Juergen Gross Cc: Quentin Lambert , Boris Ostrovsky , David Vrabel , "James E.J. Bottomley" , "Martin K. Petersen" , xen-devel@lists.xenproject.org, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] xen-scsifront: Add a missing call to kfree Message-ID: <20161125202650.GK6266@mwanda> References: <20161119182256.9081-1-lambert.quentin@gmail.com> <1320a162-dc36-5833-a746-367134dae5e7@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1320a162-dc36-5833-a746-367134dae5e7@suse.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: aserv0022.oracle.com [141.146.126.234] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 21, 2016 at 07:01:36AM +0100, Juergen Gross wrote: > On 19/11/16 19:22, Quentin Lambert wrote: > > Most error branches following the call to kmalloc contain > > a call to kfree. This patch add these calls where they are > > missing. > > > > This issue was found with Hector. > > > > Signed-off-by: Quentin Lambert > > Nice catch. I think this will need some more work, I'll do a > follow-on patch. Yeah. It's weird how we free it on the success path and all the failure paths except one. But it looks so deliberate. What's going on with that? Could you send your follow on patch as a reply to the thread? regards, dan carpenter