context.c: fixed invalid pointer
authorArt Cancro <ajc@citadel.org>
Tue, 29 Aug 2023 15:36:36 +0000 (11:36 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 29 Aug 2023 15:36:36 +0000 (11:36 -0400)
citadel/server/context.c

index 28815f485c3442ad88a025c50aa86cf2332b2a6d..8b54b02b1ebcd755780ddf5e043477b896750acb 100644 (file)
@@ -515,7 +515,6 @@ void dead_session_purge(int force) {
                //return;
                //
        begin_critical_section(S_SESSION_TABLE);
-               
        ptr = ContextList;
        while (ptr) {
                ptr2 = ptr;
@@ -539,7 +538,7 @@ void dead_session_purge(int force) {
                        rem = ptr2;
                }
                else if (ptr2->kill_me) {
-                       syslog(LOG_DEBUG, "context: session %d is timed out but non-idle", rem->cs_pid);
+                       syslog(LOG_DEBUG, "context: session %d is timed out but non-idle", ptr->cs_pid);
                }
        }
        end_critical_section(S_SESSION_TABLE);