apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: Failing apr_pool_create in case apr_pools_initialized == 0
Date Tue, 11 Dec 2007 19:47:37 GMT
Sander Striker wrote:
> After apr_terminate() when calling any function, the behaviour is undefined.
> This is as expected.  I don't see a need to protect against that.
> 

Just to make sure what I'm talking about ;)

Index: apr_pools.c
===================================================================
--- apr_pools.c	(revision 603246)
+++ apr_pools.c	(working copy)
@@ -820,6 +820,13 @@

      *newpool = NULL;

+    if (!apr_pools_initialized) {
+        if (abort_fn)
+            abort_fn(APR_ENOMEM);
+
+        return APR_ENOMEM;
+    }
+
      if (!parent)
          parent = global_pool;



Regards,
Mladen


Mime
View raw message