]> granicus.if.org Git - zfs/commitdiff
Add ida_destroy in zvol_fini to fix memleak
authorChunwei Chen <tuxoko@gmail.com>
Wed, 14 Dec 2016 17:41:39 +0000 (09:41 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 14 Dec 2016 17:41:39 +0000 (09:41 -0800)
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 <behlendorf1@llnl.gov>
Signed-off-by: Chunwei Chen <david.chen@osnexus.com>
Closes #5484

module/zfs/zvol.c

index 2c99b73c2fa96b2c335215bb6df913c54559fd84..7674b3148781fe47751d23e100925139b3038213 100644 (file)
@@ -2085,6 +2085,8 @@ zvol_fini(void)
 
        list_destroy(&zvol_state_list);
        mutex_destroy(&zvol_state_lock);
+
+       ida_destroy(&zvol_ida);
 }
 
 /* BEGIN CSTYLED */