Permalink
Browse files

Attempt to fix kmem_default leaks

Additionally, attempt to empty the heap (connected to kmem_default) on
SPL unload, to release the last leaked memory.
  • Loading branch information...
lundman committed Dec 1, 2014
1 parent 8c89b46 commit f4581407d18ea555fe5cd07e9e7912e96575ac5d
Showing with 3 additions and 0 deletions.
  1. +3 −0 module/spl/spl-vmem.c
@@ -1903,6 +1903,9 @@ void vmem_fini(vmem_t *heap)
vmem_walk(vmem_seg_arena, VMEM_ALLOC,
vmem_fini_freelist, vmem_seg_arena);
vmem_walk(heap, VMEM_ALLOC,
vmem_fini_freelist, heap);
for (id = 0; id < 5; id++) {// From vmem_init, 5 vmem_create
vmem_xfree(vmem_vmem_arena, global_vmem_reap[id], sizeof (vmem_t));
}

0 comments on commit f458140

Please sign in to comment.