From: Heiko Carstens Date: Wed, 8 Aug 2007 08:47:02 +0000 (+0200) Subject: [SCSI] zfcp: fix memory leak X-Git-Tag: v2.6.23-rc7~101^2~10 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83f6d6d7258974a99cbf465878bc11eb4d494c61;p=linux-2.6 [SCSI] zfcp: fix memory leak fix memory leak. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Signed-off-by: Swen Schillig Signed-off-by: James Bottomley --- diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index 0acf6db0a0..ad7eb4a926 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c @@ -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