Skip to content

Commit

Permalink
Btrfs: fix memory leak in load_free_space_cache()
Browse files Browse the repository at this point in the history
load_free_space_cache() has forgotten to free path.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
  • Loading branch information
Tsutomu Itoh authored and David Sterba committed Feb 15, 2012
1 parent 859acaf commit a7e221e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/free-space-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@ int load_free_space_cache(struct btrfs_fs_info *fs_info,
spin_lock(&block_group->lock);
if (block_group->disk_cache_state != BTRFS_DC_WRITTEN) {
spin_unlock(&block_group->lock);
btrfs_free_path(path);
goto out;
}
spin_unlock(&block_group->lock);
Expand Down

0 comments on commit a7e221e

Please sign in to comment.