Unverified Commit c73a2325 by Simon Deziel Committed by Christian Brauner

initutils: close dirfd in error path

parent 0a953196
......@@ -458,8 +458,10 @@ restart:
if (fd == STDERR_FILENO || fd == fddir)
break;
if (close(fd))
if (close(fd)) {
closedir(dir);
return -errno;
}
closedir(dir);
goto restart;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment