Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f5899a3 authored by Mike Christie's avatar Mike Christie Committed by James Bottomley
Browse files

[SCSI] libiscsi: fix iscsi pool leak



I am not sure what happened. It looks like we have always leaked
the q->queue that is allocated from the kfifo_init call. nab finally
noticed that we were leaking and this patch fixes it by adding a
kfree call to iscsi_pool_free. kfifo_free is not used per kfifo_init's
instructions to use kfree.

Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent f3b8436a
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1981,6 +1981,7 @@ void iscsi_pool_free(struct iscsi_pool *q)
		kfree(q->pool[i]);
		kfree(q->pool[i]);
	if (q->pool)
	if (q->pool)
		kfree(q->pool);
		kfree(q->pool);
	kfree(q->queue);
}
}
EXPORT_SYMBOL_GPL(iscsi_pool_free);
EXPORT_SYMBOL_GPL(iscsi_pool_free);