]> err.no Git - linux-2.6/commitdiff
[SCSI] zfcp: fix memory leak
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 8 Aug 2007 08:47:02 +0000 (10:47 +0200)
committerJames Bottomley <jejb@mulgrave.localdomain>
Wed, 15 Aug 2007 17:28:17 +0000 (12:28 -0500)
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>
drivers/s390/scsi/zfcp_scsi.c

index 0acf6db0a08d7ff3a60d13dc4cccec0e189ae0da..ad7eb4a9261c64a0450b1a4e0adf54c6c0de0aa9 100644 (file)
@@ -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