summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2013-03-11 18:12:58 -0500
committerDavid Sterba <dsterba@suse.cz>2013-03-12 16:34:41 +0100
commit5bc34c66028fe8c9eea21a682b760713c2e0dc47 (patch)
tree2a031d47586dc402d34f132a39472fb29aa96eb3
parent016f6f43543652da2bd26c3d7fd8ed63139e783f (diff)
btrfs-progs: close fd on return from label get/set functions
Somehow missed these 2 in the last round. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
-rw-r--r--utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index f68436d0..1c73d67c 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;
}