From commits-return-11084-apmail-apr-commits-archive=apr.apache.org@apr.apache.org Thu Dec 17 19:19:19 2009 Return-Path: Delivered-To: apmail-apr-commits-archive@www.apache.org Received: (qmail 69237 invoked from network); 17 Dec 2009 19:19:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 19:19:19 -0000 Received: (qmail 84312 invoked by uid 500); 17 Dec 2009 19:19:19 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 84240 invoked by uid 500); 17 Dec 2009 19:19:19 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 84231 invoked by uid 99); 17 Dec 2009 19:19:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 19:19:19 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 19:19:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7538C2388ABB; Thu, 17 Dec 2009 19:18:57 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r891851 - /apr/apr-util/branches/1.4.x/hooks/apr_hooks.c Date: Thu, 17 Dec 2009 19:18:57 -0000 To: commits@apr.apache.org From: trawick@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091217191857.7538C2388ABB@eris.apache.org> Author: trawick Date: Thu Dec 17 19:18:57 2009 New Revision: 891851 URL: http://svn.apache.org/viewvc?rev=891851&view=rev Log: merge r775681 from apr trunk prevent crash if apr_hook_deregister_all() called but no hooks had been registered Modified: apr/apr-util/branches/1.4.x/hooks/apr_hooks.c Modified: apr/apr-util/branches/1.4.x/hooks/apr_hooks.c URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.4.x/hooks/apr_hooks.c?rev=891851&r1=891850&r2=891851&view=diff ============================================================================== --- apr/apr-util/branches/1.4.x/hooks/apr_hooks.c (original) +++ apr/apr-util/branches/1.4.x/hooks/apr_hooks.c Thu Dec 17 19:18:57 2009 @@ -265,6 +265,10 @@ #endif int n; + if (!s_aHooksToSort) { + return; + } + for(n=0 ; n < s_aHooksToSort->nelts ; ++n) { HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n]; *pEntry->paHooks=NULL;