From 5595263cb6e1ded0e2df0e1f28a829ea97457268 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Thu, 24 Mar 2016 19:31:33 +0100 Subject: [PATCH] btrfs-progs: fix fd leak in get_subvol_info A typo, introduced in "btrfs-progs: create get_subvol_info()". Resolves-coverity-id: 1357106 Signed-off-by: David Sterba --- utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.c b/utils.c index 24eb853..75ce6ea 100644 --- a/utils.c +++ b/utils.c @@ -3236,7 +3236,7 @@ int get_subvol_info(const char *fullpath, struct root_info *get_ri) out: close_file_or_dir(mntfd, dirstream2); - close_file_or_dir(mntfd, dirstream1); + close_file_or_dir(fd, dirstream1); free(mnt); return ret; -- 2.7.4