Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 38248 invoked from network); 5 Apr 2008 15:05:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Apr 2008 15:05:42 -0000 Received: (qmail 93847 invoked by uid 500); 5 Apr 2008 15:05:42 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 93803 invoked by uid 500); 5 Apr 2008 15:05:42 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 93792 invoked by uid 99); 5 Apr 2008 15:05:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Apr 2008 08:05:42 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 05 Apr 2008 15:04:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1334B1A9832; Sat, 5 Apr 2008 08:05:16 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r645112 - /httpd/httpd/trunk/modules/session/mod_session.c Date: Sat, 05 Apr 2008 15:05:16 -0000 To: cvs@httpd.apache.org From: minfrin@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080405150517.1334B1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: minfrin Date: Sat Apr 5 08:05:15 2008 New Revision: 645112 URL: http://svn.apache.org/viewvc?rev=645112&view=rev Log: Make sure we protect ourselves against the session being NULL, which it will be if no session is configured. Modified: httpd/httpd/trunk/modules/session/mod_session.c Modified: httpd/httpd/trunk/modules/session/mod_session.c URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/session/mod_session.c?rev=645112&r1=645111&r2=645112&view=diff ============================================================================== --- httpd/httpd/trunk/modules/session/mod_session.c (original) +++ httpd/httpd/trunk/modules/session/mod_session.c Sat Apr 5 08:05:15 2008 @@ -92,7 +92,9 @@ if (!z) { ap_session_load(r, &z); } - *value = apr_table_get(z->entries, key); + if (z) { + *value = apr_table_get(z->entries, key); + } } /** @@ -113,13 +115,15 @@ if (!z) { ap_session_load(r, &z); } - if (value) { - apr_table_set(z->entries, key, value); - } - else { - apr_table_unset(z->entries, key); + if (z) { + if (value) { + apr_table_set(z->entries, key, value); + } + else { + apr_table_unset(z->entries, key); + } + z->dirty = 1; } - z->dirty = 1; } /**