[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e8e618f7-df20-bb09-a9ff-bd6e3442ceba@suse.de>
Date: Fri, 21 Feb 2020 10:18:43 +0100
From: Hannes Reinecke <hare@...e.de>
To: Igor Druzhinin <igor.druzhinin@...rix.com>,
fcoe-devel@...n-fcoe.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: jejb@...ux.ibm.com, martin.petersen@...cle.com
Subject: Re: [PATCH RESEND 1/2] scsi: libfc: free response frame from GPN_ID
On 1/14/20 3:43 PM, Igor Druzhinin wrote:
> fc_disc_gpn_id_resp() should be the last function using it so free it
> here to avoid memory leak.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@...rix.com>
> ---
> 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 9c5f7c9..2b865c6 100644
> --- a/drivers/scsi/libfc/fc_disc.c
> +++ b/drivers/scsi/libfc/fc_disc.c
> @@ -628,6 +628,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);
> }
>
> /**
>
Reviewed-by: Hannes Reinecke <hare@...e.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@...e.de +49 911 74053 688
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Felix Imendörffer
Powered by blists - more mailing lists