[SCSI] zfcp: fix memory leak
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>
This commit is contained in:
Родитель
28e8351ac2
Коммит
83f6d6d725
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче