- A call to close(2) might overwrite errno and thus give a wrong error message

on g_providername failure.

Suggested by:	pjd
Approved by:	pjd (mentor)
This commit is contained in:
lulf 2008-09-30 11:46:14 +00:00
parent c725244bd2
commit 54c73027a0

View File

@ -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)