apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r891849 - /apr/apr-util/branches/1.5.x/hooks/apr_hooks.c
Date Thu, 17 Dec 2009 19:17:45 GMT
Author: trawick
Date: Thu Dec 17 19:17:45 2009
New Revision: 891849

URL: http://svn.apache.org/viewvc?rev=891849&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.5.x/hooks/apr_hooks.c

Modified: apr/apr-util/branches/1.5.x/hooks/apr_hooks.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/hooks/apr_hooks.c?rev=891849&r1=891848&r2=891849&view=diff
==============================================================================
--- apr/apr-util/branches/1.5.x/hooks/apr_hooks.c (original)
+++ apr/apr-util/branches/1.5.x/hooks/apr_hooks.c Thu Dec 17 19:17:45 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;



Mime
View raw message