Skip to content

Commit

Permalink
[SCSI] iscsi bugfixes: fix mem leaks in libiscsi
Browse files Browse the repository at this point in the history
We were leaking some strings. This patch just frees them.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
Mike Christie authored and James Bottomley committed Jul 28, 2006
1 parent 40527af commit f3ff0c3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/scsi/libiscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,8 @@ void iscsi_session_teardown(struct iscsi_cls_session *cls_session)
iscsi_pool_free(&session->mgmtpool, (void**)session->mgmt_cmds);
iscsi_pool_free(&session->cmdpool, (void**)session->cmds);

kfree(session->targetname);

iscsi_destroy_session(cls_session);
scsi_host_put(shost);
module_put(owner);
Expand Down Expand Up @@ -1491,6 +1493,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn)

spin_lock_bh(&session->lock);
kfree(conn->data);
kfree(conn->persistent_address);
__kfifo_put(session->mgmtpool.queue, (void*)&conn->login_mtask,
sizeof(void*));
list_del(&conn->item);
Expand Down

0 comments on commit f3ff0c3

Please sign in to comment.