Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933946AbZJIRoJ (ORCPT ); Fri, 9 Oct 2009 13:44:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932596AbZJIRoI (ORCPT ); Fri, 9 Oct 2009 13:44:08 -0400 Received: from emulex.emulex.com ([138.239.112.1]:38061 "EHLO emulex.emulex.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932095AbZJIRoH (ORCPT ); Fri, 9 Oct 2009 13:44:07 -0400 Message-ID: <4ACF763C.5070308@emulex.com> Date: Fri, 9 Oct 2009 13:43:24 -0400 From: James Smart User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Jiri Slaby CC: "James.Bottomley@suse.de" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH -repost 3/4] SCSI: lpfc, fix memory leak References: <1255096688-23399-1-git-send-email-jirislaby@gmail.com> <1255096688-23399-3-git-send-email-jirislaby@gmail.com> In-Reply-To: <1255096688-23399-3-git-send-email-jirislaby@gmail.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 Oct 2009 17:43:26.0373 (UTC) FILETIME=[014ADD50:01CA4908] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1088 Lines: 34 Acked-by: James Smart -- james s Jiri Slaby wrote: > Stanse found a memory leak on one fail path in lpfc_sli4_read_rev. > > Add there kfree. > > Signed-off-by: Jiri Slaby > Cc: James Smart > Cc: James E.J. Bottomley > --- > drivers/scsi/lpfc/lpfc_sli.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c > index 43cbe33..7750868 100644 > --- a/drivers/scsi/lpfc/lpfc_sli.c > +++ b/drivers/scsi/lpfc/lpfc_sli.c > @@ -4211,6 +4211,7 @@ lpfc_sli4_read_rev(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq, > if (rc) { > dma_free_coherent(&phba->pcidev->dev, dma_size, > dmabuf->virt, dmabuf->phys); > + kfree(dmabuf); > return -EIO; > } > > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/