summaryrefslogtreecommitdiffstats
path: root/module/zfs/dbuf.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 10:19:04 -0700
committerBrian Behlendorf <[email protected]>2010-08-31 08:38:44 -0700
commit753972fccf7d3d5c9406edbd5281950681e0f606 (patch)
tree382601404697efa5a11e4c114d9835e503a59392 /module/zfs/dbuf.c
parent5631c038895ea97fde261831887226ee56d06dd5 (diff)
Fix dbuf_dirty_record_t leaks
Fix two leaks with dbuf_dirty_record_t Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/dbuf.c')
-rw-r--r--module/zfs/dbuf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c
index 7b66fcea4..55326c498 100644
--- a/module/zfs/dbuf.c
+++ b/module/zfs/dbuf.c
@@ -2319,6 +2319,10 @@ dbuf_sync_leaf(dbuf_dirty_record_t *dr, dmu_tx_t *tx)
ASSERT(dr->dr_next == NULL);
ASSERT(dr->dr_dbuf == db);
*drp = dr->dr_next;
+ if (dr->dr_dbuf->db_level != 0) {
+ mutex_destroy(&dr->dt.di.dr_mtx);
+ list_destroy(&dr->dt.di.dr_children);
+ }
kmem_free(dr, sizeof (dbuf_dirty_record_t));
ASSERT(db->db_dirtycnt > 0);
db->db_dirtycnt -= 1;