diff options
author | chandan <chandan@linux.vnet.ibm.com> | 2013-10-07 12:06:11 +0530 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-16 08:23:12 -0400 |
commit | 6659f446d4b57018ba7b04a7b9c7cdd553ad9f7a (patch) | |
tree | 13d3e9bad79df27dd5774485b09f174884b7f7a5 | |
parent | 8fa3f2085c8637657fb486879054c1777b55b404 (diff) |
btrfs-progs: btrfs_list_find_updated_files: Fix memory leak.
The current code returns from the function when the call to ioctl
fails. This may leak cache_dir_name and cache_full_name. Fix it.
Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
-rw-r--r-- | btrfs-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/btrfs-list.c b/btrfs-list.c index 9cadbf5b..9411e4d1 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -1686,7 +1686,7 @@ int btrfs_list_find_updated_files(int fd, u64 root_id, u64 oldest_gen) if (ret < 0) { fprintf(stderr, "ERROR: can't perform the search- %s\n", strerror(e)); - return ret; + break; } /* the ioctl returns the number of item it found in nr_items */ if (sk->nr_items == 0) |