diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk_zoned.c index 172f720b8d63..f5df82c26c16 100644 --- a/drivers/block/null_blk_zoned.c +++ b/drivers/block/null_blk_zoned.c @@ -149,6 +149,7 @@ void null_free_zoned_dev(struct nullb_device *dev) { bitmap_free(dev->zone_locks); kvfree(dev->zones); + dev->zones = NULL; } static inline void null_lock_zone(struct nullb_device *dev, unsigned int zno)