apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r775681 - /apr/apr/trunk/hooks/apr_hooks.c
Date Sun, 17 May 2009 15:55:11 GMT
Author: trawick
Date: Sun May 17 15:55:11 2009
New Revision: 775681

URL: http://svn.apache.org/viewvc?rev=775681&view=rev
Log:
prevent crash if apr_hook_deregister_all() called but no hooks had been registered

Modified:
    apr/apr/trunk/hooks/apr_hooks.c

Modified: apr/apr/trunk/hooks/apr_hooks.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/hooks/apr_hooks.c?rev=775681&r1=775680&r2=775681&view=diff
==============================================================================
--- apr/apr/trunk/hooks/apr_hooks.c (original)
+++ apr/apr/trunk/hooks/apr_hooks.c Sun May 17 15:55:11 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