mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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:
parent
08742bd257
commit
9f69cbc0cb
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Reference in a new issue