diff options
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r-- | fs/btrfs/tests/btrfs-tests.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c index db72b3b6209e..4cb8fcfd3ec4 100644 --- a/fs/btrfs/tests/btrfs-tests.c +++ b/fs/btrfs/tests/btrfs-tests.c @@ -174,8 +174,12 @@ void btrfs_free_dummy_root(struct btrfs_root *root) /* Will be freed by btrfs_free_fs_roots */ if (WARN_ON(test_bit(BTRFS_ROOT_IN_RADIX, &root->state))) return; - if (root->node) + if (root->node) { + /* One for allocate_extent_buffer */ free_extent_buffer(root->node); + /* One for get_exent_buffer */ + free_extent_buffer(root->node); + } kfree(root); } |