lkml.org 
[lkml]   [2020]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 87/99] scsi: libfc: free response frame from GPN_ID
    Date
    From: Igor Druzhinin <igor.druzhinin@citrix.com>

    [ Upstream commit ff6993bb79b9f99bdac0b5378169052931b65432 ]

    fc_disc_gpn_id_resp() should be the last function using it so free it here
    to avoid memory leak.

    Link: https://lore.kernel.org/r/1579013000-14570-2-git-send-email-igor.druzhinin@citrix.com
    Reviewed-by: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/scsi/libfc/fc_disc.c | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/drivers/scsi/libfc/fc_disc.c b/drivers/scsi/libfc/fc_disc.c
    index bb9c1c0166439..28b50ab2fbb01 100644
    --- a/drivers/scsi/libfc/fc_disc.c
    +++ b/drivers/scsi/libfc/fc_disc.c
    @@ -652,6 +652,8 @@ static void fc_disc_gpn_id_resp(struct fc_seq *sp, struct fc_frame *fp,
    }
    out:
    kref_put(&rdata->kref, fc_rport_destroy);
    + if (!IS_ERR(fp))
    + fc_frame_free(fp);
    }

    /**
    --
    2.20.1


    \
     
     \ /
      Last update: 2020-03-19 14:18    [W:4.025 / U:0.668 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site