From: Igor Druzhinin <igor.druzhinin@citrix.com>
To: <fcoe-devel@open-fcoe.org>, <linux-scsi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <hare@suse.de>
Cc: <jejb@linux.ibm.com>, <martin.petersen@oracle.com>,
Igor Druzhinin <igor.druzhinin@citrix.com>
Subject: [PATCH RESEND 1/2] scsi: libfc: free response frame from GPN_ID
Date: Tue, 14 Jan 2020 14:43:19 +0000 [thread overview]
Message-ID: <1579013000-14570-2-git-send-email-igor.druzhinin@citrix.com> (raw)
In-Reply-To: <1579013000-14570-1-git-send-email-igor.druzhinin@citrix.com>
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@citrix.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);
}
/**
--
2.7.4
next prev parent reply other threads:[~2020-01-14 14:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-14 14:43 [PATCH RESEND 0/2] Fixing libfc memory leaks Igor Druzhinin
2020-01-14 14:43 ` Igor Druzhinin [this message]
2020-02-21 9:18 ` [PATCH RESEND 1/2] scsi: libfc: free response frame from GPN_ID Hannes Reinecke
2020-02-21 22:56 ` Martin K. Petersen
2020-01-14 14:43 ` [PATCH RESEND 2/2] scsi: libfc: drop extra rport reference in fc_rport_create() Igor Druzhinin
2020-02-21 9:21 ` Hannes Reinecke
2020-01-21 4:56 ` [PATCH RESEND 0/2] Fixing libfc memory leaks Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1579013000-14570-2-git-send-email-igor.druzhinin@citrix.com \
--to=igor.druzhinin@citrix.com \
--cc=fcoe-devel@open-fcoe.org \
--cc=hare@suse.de \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).