diff options
author | Hillf Danton <dhillf@gmail.com> | 2010-12-01 01:19:04 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-12-21 19:24:24 +0100 |
commit | 0e9e3d3b155c35d5750805c2b8bb6d5b6e6a3bfb (patch) | |
tree | c47b35dee5b002531d40a9f5126e343906f4bdfe /drivers/scsi/libfc | |
parent | [SCSI] libfc: fix memory leakage in local port (diff) | |
download | linux-0e9e3d3b155c35d5750805c2b8bb6d5b6e6a3bfb.tar.xz linux-0e9e3d3b155c35d5750805c2b8bb6d5b6e6a3bfb.zip |
[SCSI] libfc: fix memory leakage in remote port
There seems rdata should get put before return.
Signed-off-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_rport.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_rport.c b/drivers/scsi/libfc/fc_rport.c index a84ef13ed74a..a7175adab32d 100644 --- a/drivers/scsi/libfc/fc_rport.c +++ b/drivers/scsi/libfc/fc_rport.c @@ -652,7 +652,7 @@ void fc_rport_flogi_resp(struct fc_seq *sp, struct fc_frame *fp, FC_RPORT_DBG(rdata, "Received a FLOGI %s\n", fc_els_resp_type(fp)); if (fp == ERR_PTR(-FC_EX_CLOSED)) - return; + goto put; mutex_lock(&rdata->rp_mutex); @@ -689,6 +689,7 @@ out: fc_frame_free(fp); err: mutex_unlock(&rdata->rp_mutex); +put: kref_put(&rdata->kref, rdata->local_port->tt.rport_destroy); return; bad: |