lkml.org 
[lkml]   [2009]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -2nd repost 3/4] SCSI: lpfc, fix memory leak
    Date
    Stanse found a memory leak on one fail path in lpfc_sli4_read_rev.

    Add there kfree.

    Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
    Cc: James Smart <james.smart@emulex.com>
    Cc: James E.J. Bottomley <James.Bottomley@suse.de>
    ---
    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;
    }

    --
    1.6.4.2


    \
     
     \ /
      Last update: 2009-11-04 17:17    [W:0.035 / U:31.232 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site