Skip to content

Commit

Permalink
[SCSI] zfcp: fix memory leak
Browse files Browse the repository at this point in the history
fix memory leak.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Heiko Carstens authored and James Bottomley committed Aug 15, 2007
1 parent 28e8351 commit 83f6d6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/s390/scsi/zfcp_scsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,9 @@ zfcp_reset_fc_host_stats(struct Scsi_Host *shost)
return;

ret = zfcp_fsf_exchange_port_data(NULL, adapter, data);
if (ret == 0) {
if (ret) {
kfree(data);
} else {
adapter->stats_reset = jiffies/HZ;
old_data = adapter->stats_reset_data;
adapter->stats_reset_data = data; /* finally freed in
Expand Down

0 comments on commit 83f6d6d

Please sign in to comment.