MFC r199582:

Fix minor resource leak in a function which was introduced by changing an
  err() to a return in r106254.
This commit is contained in:
Alexander Leidinger 2009-11-27 10:53:46 +00:00
parent 08742bd257
commit 9f69cbc0cb

View File

@ -543,8 +543,10 @@ getfslab(const char *str)
if ((fd = open(str, O_RDONLY)) == -1)
err(1, "cannot open `%s'", str);
if (ioctl(fd, DIOCGDINFO, &dl) == -1)
if (ioctl(fd, DIOCGDINFO, &dl) == -1) {
(void) close(fd);
return(NULL);
}
(void) close(fd);