aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-filesystem.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.cz>2014-12-30 15:37:29 +0100
committerDavid Sterba <dsterba@suse.cz>2014-12-30 15:48:55 +0100
commitf8a24717b11fa5501ade5c76077584f771b005c1 (patch)
treed8a60d1f6650ba7fe71ca0726dd1aa21a2d841a3 /cmds-filesystem.c
parent08dfef4fbdbfcd06a7a2c8743d9dcba6fa84d747 (diff)
downloadbtrfs-progs-f8a24717b11fa5501ade5c76077584f771b005c1.tar.gz
btrfs-progs-f8a24717b11fa5501ade5c76077584f771b005c1.tar.xz
btrfs-progs-f8a24717b11fa5501ade5c76077584f771b005c1.zip
btrfs-progs: fix minor leak of dev_info in btrfs_scan_kernel
Resolves-coverity-id: 1127098 Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r--cmds-filesystem.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 1c1d34a..a3cf114 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -516,8 +516,10 @@ static int btrfs_scan_kernel(void *search)
continue;
ret = get_fs_info(mnt->mnt_dir, &fs_info_arg,
&dev_info_arg);
- if (ret)
+ if (ret) {
+ kfree(dev_info_arg);
goto out;
+ }
if (get_label_mounted(mnt->mnt_dir, label)) {
kfree(dev_info_arg);