aboutsummaryrefslogtreecommitdiff
path: root/sbin/bsdlabel/bsdlabel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/bsdlabel/bsdlabel.c')
-rw-r--r--sbin/bsdlabel/bsdlabel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 97ddeb6aceb1..1cb99950bbd8 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -236,11 +236,12 @@ main(int argc, char *argv[])
return(1);
}
pname = g_providername(fd);
- close(fd);
if (pname == NULL) {
warn("error getting providername for %s", specname);
+ close(fd);
return(1);
}
+ close(fd);
}
if (installboot && op == UNSPEC)