summaryrefslogtreecommitdiff
path: root/srclib/apr-util/hooks
diff options
context:
space:
mode:
authorStefan Fritsch <sf@sfritsch.de>2012-01-29 13:30:57 +0100
committerStefan Fritsch <sf@sfritsch.de>2012-01-29 13:30:57 +0100
commitd1d018768afd79cb2ecd1805f0d8f3ed23f4076b (patch)
tree04d53b0a9786234f3bbd3badffdb22dbe2b74d03 /srclib/apr-util/hooks
parent0890390c00801651d08d3794e13b31a5dabbf5ef (diff)
downloadapache2-upstream/2.2.22.tar.gz
Upstream tarball 2.2.22upstream/2.2.22
Diffstat (limited to 'srclib/apr-util/hooks')
-rw-r--r--srclib/apr-util/hooks/apr_hooks.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/srclib/apr-util/hooks/apr_hooks.c b/srclib/apr-util/hooks/apr_hooks.c
index 44353cbb..6abe1935 100644
--- a/srclib/apr-util/hooks/apr_hooks.c
+++ b/srclib/apr-util/hooks/apr_hooks.c
@@ -243,6 +243,10 @@ APU_DECLARE(void) apr_hook_sort_all(void)
#endif
int n;
+ if (!s_aHooksToSort) {
+ s_aHooksToSort = apr_array_make(apr_hook_global_pool, 1, sizeof(HookSortEntry));
+ }
+
for(n=0 ; n < s_aHooksToSort->nelts ; ++n) {
HookSortEntry *pEntry=&((HookSortEntry *)s_aHooksToSort->elts)[n];
*pEntry->paHooks=sort_hook(*pEntry->paHooks,pEntry->szHookName);
@@ -261,6 +265,10 @@ APU_DECLARE(void) apr_hook_deregister_all(void)
#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;