mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-11 03:31:17 +00:00
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>
This commit is contained in:
parent
8fa3f2085c
commit
6659f446d4
@ -1686,7 +1686,7 @@ int btrfs_list_find_updated_files(int fd, u64 root_id, u64 oldest_gen)
|
|||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
fprintf(stderr, "ERROR: can't perform the search- %s\n",
|
fprintf(stderr, "ERROR: can't perform the search- %s\n",
|
||||||
strerror(e));
|
strerror(e));
|
||||||
return ret;
|
break;
|
||||||
}
|
}
|
||||||
/* the ioctl returns the number of item it found in nr_items */
|
/* the ioctl returns the number of item it found in nr_items */
|
||||||
if (sk->nr_items == 0)
|
if (sk->nr_items == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user