diff --git a/lib/device/bcache.c b/lib/device/bcache.c index c7c19097c..b1f7d2a41 100644 --- a/lib/device/bcache.c +++ b/lib/device/bcache.c @@ -560,7 +560,7 @@ static bool _init_free_list(struct bcache *cache, unsigned count, unsigned pgsiz return false; cache->raw_blocks = dm_malloc(count * sizeof(*cache->raw_blocks)); - if (!cache->raw_blocks) + if (!cache->raw_blocks) { free(data); return false; }