user_busy: fix missing close of subuid file on error

Closes #69

Reported-by: plenkow
Signed-off-by: Serge Hallyn <serge@hallyn.com>
This commit is contained in:
Serge Hallyn 2017-03-23 17:07:46 -05:00
parent db57db52cf
commit 6eae751e70

View File

@ -170,6 +170,9 @@ static int user_busy_processes (const char *name, uid_t uid)
proc = opendir ("/proc");
if (proc == NULL) {
perror ("opendir /proc");
#ifdef ENABLE_SUBIDS
sub_uid_close();
#endif
return 0;
}
if (stat ("/", &sbroot) != 0) {