From d73f9eb81664e52f056f7046dde19d9d4f44aa2d Mon Sep 17 00:00:00 2001 From: Dave West Date: Sat, 26 Jan 2008 18:57:31 +0000 Subject: [PATCH] Fix the segault on server shutdown that crept in when we decided to purge users at logout. --- citadel/user_ops.c | 4 ++++ 1 file changed, 4 insertions(+) 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); -- 2.30.2