diff options
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index ba28cefdf9e7..b1d920b30070 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -189,6 +189,12 @@ btrfs_alloc_dummy_block_group(unsigned long length) kfree(cache); return NULL; } + cache->fs_info = btrfs_alloc_dummy_fs_info(); + if (!cache->fs_info) { + kfree(cache->free_space_ctl); + kfree(cache); + return NULL; + } cache->key.objectid = 0; cache->key.offset = length; |