From: Dave West Date: Sat, 26 Jan 2008 18:57:31 +0000 (+0000) Subject: Fix the segault on server shutdown that crept in when we decided to X-Git-Tag: v7.86~2554 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=d73f9eb81664e52f056f7046dde19d9d4f44aa2d Fix the segault on server shutdown that crept in when we decided to purge users at logout. --- diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 9cb18c870..974e1da8b 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -810,6 +810,10 @@ int purge_user(char pname[]) makeuserkey(usernamekey, pname); + /* If the name is empty we can't find them in the DB any way so just return */ + if (IsEmptyStr(pname)) + return (ERROR + NO_SUCH_USER); + if (getuser(&usbuf, pname) != 0) { lprintf(CTDL_ERR, "Cannot purge user <%s> - not found\n", pname); return (ERROR + NO_SUCH_USER);