Fix minor resource leak in a function which was introduced by changing an

err() to a return in r106254.

MFC after:	1 week
This commit is contained in:
Alexander Leidinger 2009-11-20 15:27:00 +00:00
parent 04311706d0
commit 4b2d15efe5

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