From: Chunwei Chen Date: Wed, 14 Dec 2016 17:41:39 +0000 (-0800) Subject: Add ida_destroy in zvol_fini to fix memleak X-Git-Tag: zfs-0.7.0-rc3~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2d8bdc62ef779a632615b8a4be90009517f457a;p=zfs Add ida_destroy in zvol_fini to fix memleak User of ida needs to call ida_destroy after using it. Otherwise ida->free_bitmap and/or other stuff may leak. Reviewed-by: Brian Behlendorf Signed-off-by: Chunwei Chen Closes #5484 --- diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c index 2c99b73c2..7674b3148 100644 --- a/module/zfs/zvol.c +++ b/module/zfs/zvol.c @@ -2085,6 +2085,8 @@ zvol_fini(void) list_destroy(&zvol_state_list); mutex_destroy(&zvol_state_lock); + + ida_destroy(&zvol_ida); } /* BEGIN CSTYLED */