summaryrefslogtreecommitdiff
path: root/fs/btrfs/tests/btrfs-tests.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/tests/btrfs-tests.c')
-rw-r--r--fs/btrfs/tests/btrfs-tests.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/tests/btrfs-tests.c b/fs/btrfs/tests/btrfs-tests.c
index db72b3b6209e..8a59597f1883 100644
--- a/fs/btrfs/tests/btrfs-tests.c
+++ b/fs/btrfs/tests/btrfs-tests.c
@@ -174,8 +174,10 @@ 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);
+ }
kfree(root);
}