[PATCH 1/4] btrfs-progs: close fd on return from label get/set functions

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

 



Somehow missed these 2 in the last round.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 utils.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/utils.c b/utils.c
index f68436d..1c73d67 100644
--- a/utils.c
+++ b/utils.c
@@ -1217,6 +1217,7 @@ static int set_label_mounted(const char *mount_path, const char *label)
 		return -1;
 	}
 
+	close(fd);
 	return 0;
 }
 
@@ -1274,6 +1275,7 @@ static int get_label_mounted(const char *mount_path)
 	}
 
 	fprintf(stdout, "%s\n", label);
+	close(fd);
 	return 0;
 }
 
-- 
1.7.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