because all pools have NULL allocators then.
This workaround is probably not very efficient,
but is only used when we do APR_POOL_DEBUG
and efficiency shouldn't be a big concern then.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1863179 13f79535-47bb-0310-9956-
ffa450edef68
/* The required block is rather larger. Use allocator directly so that
* the memory can be freed independently from the pool. */
allocator = apr_pool_allocator_get(vb->pool);
+ /* Happens if APR was compiled with APR_POOL_DEBUG */
+ if (allocator == NULL) {
+ apr_allocator_create(&allocator);
+ ap_assert(allocator != NULL);
+ }
if (new_len <= VARBUF_MAX_SIZE)
new_node = apr_allocator_alloc(allocator,
new_len + APR_ALIGN_DEFAULT(sizeof(*new_info)));