浏览代码

[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: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Mike Christie 16 年之前
父节点
当前提交
2f5899a39d
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/scsi/libiscsi.c

+ 1 - 0
drivers/scsi/libiscsi.c

@@ -1981,6 +1981,7 @@ void iscsi_pool_free(struct iscsi_pool *q)
 		kfree(q->pool[i]);
 	if (q->pool)
 		kfree(q->pool);
+	kfree(q->queue);
 }
 EXPORT_SYMBOL_GPL(iscsi_pool_free);