Fix segfault in select mode if --uid was given.
authorAndre Noll <maan@systemlinux.org>
Sat, 8 Nov 2008 23:03:06 +0000 (00:03 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 8 Nov 2008 23:03:06 +0000 (00:03 +0100)
We must not close tables for non-admissible users.

user.c

diff --git a/user.c b/user.c
index 2798209..497af15 100644 (file)
--- a/user.c
+++ b/user.c
@@ -310,6 +310,9 @@ void close_user_tables(void)
 
                if (!ui_used(ui))
                        continue;
+               if (!ui->table)
+                       continue;
+               DEBUG_LOG("closing user table for uid %u\n", (unsigned)ui->uid);
                ret = osl(osl_close_table(ui->table, OSL_MARK_CLEAN));
                if (ret < 0)
                        ERROR_LOG("failed to close user table %u: %s\n",