[PATCH 03/17] Btrfs-progs: close file descriptor in cmds-send.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



valgrind found this very obvious issue.

Signed-off-by: Stefan Behrens <sbehrens@xxxxxxxxxxxxxxxx>
---
 cmds-send.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds-send.c b/cmds-send.c
index 5a7183d..3ba5af6 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -82,6 +82,7 @@ int find_mount_root(const char *path, char **mount_root)
 			}
 		}
 	}
+	fclose(mnttab);
 
 	*mount_root = realpath(longest_match, NULL);
 	free(longest_match);
-- 
1.8.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux