diff options
author | trasz <trasz@FreeBSD.org> | 2013-10-04 19:31:41 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2013-10-04 19:31:41 +0000 |
commit | cf59042d5a28df352e229b74095717665e24e29c (patch) | |
tree | 7c75e695b8c1a13ac11e6a8d723c6d52ff5de5d1 /sys/dev/iscsi/icl.c | |
parent | 56fd4865810492ccebaee859e1347903cae1d601 (diff) | |
download | FreeBSD-src-cf59042d5a28df352e229b74095717665e24e29c.zip FreeBSD-src-cf59042d5a28df352e229b74095717665e24e29c.tar.gz |
Don't leak memory when removing an unconnected session, and remove useless
UMA_ZONE_NOFREE that caused another leak when unloading the module.
Approved by: re (glebius)
Sponsored by: FreeBSD Foundation
Diffstat (limited to 'sys/dev/iscsi/icl.c')
-rw-r--r-- | sys/dev/iscsi/icl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/iscsi/icl.c b/sys/dev/iscsi/icl.c index eb9cf4e..6796878 100644 --- a/sys/dev/iscsi/icl.c +++ b/sys/dev/iscsi/icl.c @@ -957,6 +957,7 @@ icl_pdu_queue(struct icl_pdu *ip) if (ic->ic_disconnecting || ic->ic_socket == NULL) { ICL_DEBUG("icl_pdu_queue on closed connection"); ICL_CONN_UNLOCK(ic); + icl_pdu_free(ip); return; } TAILQ_INSERT_TAIL(&ic->ic_to_send, ip, ip_next); @@ -1259,10 +1260,10 @@ icl_load(void) icl_conn_zone = uma_zcreate("icl_conn", sizeof(struct icl_conn), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); icl_pdu_zone = uma_zcreate("icl_pdu", sizeof(struct icl_pdu), NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_NOFREE); + UMA_ALIGN_PTR, 0); refcount_init(&icl_ncons, 0); } |