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:
parent
04311706d0
commit
4b2d15efe5
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user