Skip to content
This repository has been archived by the owner on Nov 7, 2019. It is now read-only.

Commit

Permalink
6220 memleak in l2arc on debug build
Browse files Browse the repository at this point in the history
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
  • Loading branch information
Arne Jansen authored and rmustacc committed Sep 14, 2015
1 parent 47d6cd8 commit c546f36
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions usr/src/uts/common/fs/zfs/arc.c
Expand Up @@ -1305,6 +1305,13 @@ arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem_cache_t *old, kmem_cache_t *new)
VERIFY(!HDR_L2_WRITING(hdr));
VERIFY3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL);

#ifdef ZFS_DEBUG
if (hdr->b_l1hdr.b_thawed != NULL) {
kmem_free(hdr->b_l1hdr.b_thawed, 1);
hdr->b_l1hdr.b_thawed = NULL;
}
#endif

nhdr->b_flags &= ~ARC_FLAG_HAS_L1HDR;
}
/*
Expand Down

0 comments on commit c546f36

Please sign in to comment.