Index: modules/http2/h2_conn.c
===================================================================
--- modules/http2/h2_conn.c	(revision 1781889)
+++ modules/http2/h2_conn.c	(working copy)
@@ -26,6 +26,8 @@
 #include <http_protocol.h>
 #include <http_request.h>
 
+#include "mpm_common.h" /* for ap_max_mem_free */
+
 #include "h2_private.h"
 #include "h2.h"
 #include "h2_config.h"
@@ -250,6 +252,7 @@
 conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent)
 {
     apr_allocator_t *allocator;
+    apr_thread_mutex_t *mutex;
     apr_pool_t *pool;
     conn_rec *c;
     void *cfg;
@@ -264,14 +267,18 @@
      * another thread.
      */
     apr_allocator_create(&allocator);
+    apr_allocator_max_free_set(allocator, ap_max_mem_free);
     apr_pool_create_ex(&pool, parent, NULL, allocator);
+    apr_allocator_owner_set(allocator, pool);
     apr_pool_tag(pool, "h2_slave_conn");
-    apr_allocator_owner_set(allocator, pool);
+    apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT, pool);
+    apr_allocator_mutex_set(allocator, mutex);
 
     c = (conn_rec *) apr_palloc(pool, sizeof(conn_rec));
     if (c == NULL) {
         ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOMEM, master, 
                       APLOGNO(02913) "h2_task: creating conn");
+        apr_pool_destroy(pool);
         return NULL;
     }
     
Index: modules/http2/h2_mplx.c
===================================================================
--- modules/http2/h2_mplx.c	(revision 1781889)
+++ modules/http2/h2_mplx.c	(working copy)
@@ -39,6 +39,7 @@
 #include "h2_mplx.h"
 #include "h2_ngn_shed.h"
 #include "h2_request.h"
+#include "h2_session.h"
 #include "h2_stream.h"
 #include "h2_task.h"
 #include "h2_worker.h"
@@ -259,32 +260,23 @@
  *   their HTTP/1 cousins, the separate allocator seems to work better
  *   than protecting a shared h2_session one with an own lock.
  */
-h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *parent, 
-                        const h2_config *conf, 
-                        apr_interval_time_t stream_timeout,
-                        h2_workers *workers)
+h2_mplx *h2_mplx_create(h2_session *session, h2_workers *workers)
 {
     apr_status_t status = APR_SUCCESS;
-    apr_allocator_t *allocator = NULL;
+    conn_rec *c = session->c;
+    const h2_config *conf = session->config;
     h2_mplx *m;
-    ap_assert(conf);
     
-    status = apr_allocator_create(&allocator);
-    if (status != APR_SUCCESS) {
-        return NULL;
-    }
-
-    m = apr_pcalloc(parent, sizeof(h2_mplx));
+    m = apr_pcalloc(session->pool, sizeof(h2_mplx));
     if (m) {
         m->id = c->id;
         APR_RING_ELEM_INIT(m, link);
         m->c = c;
-        apr_pool_create_ex(&m->pool, parent, NULL, allocator);
+        apr_pool_create(&m->pool, session->pool);
         if (!m->pool) {
             return NULL;
         }
         apr_pool_tag(m->pool, "h2_mplx");
-        apr_allocator_owner_set(allocator, m->pool);
         
         status = apr_thread_mutex_create(&m->lock, APR_THREAD_MUTEX_DEFAULT,
                                          m->pool);
@@ -311,7 +303,7 @@
         m->tasks = h2_ihash_create(m->pool, offsetof(h2_task,stream_id));
         m->redo_tasks = h2_ihash_create(m->pool, offsetof(h2_task, stream_id));
 
-        m->stream_timeout = stream_timeout;
+        m->stream_timeout = session->s->timeout;
         m->workers = workers;
         m->workers_max = workers->max_workers;
         m->workers_limit = 6; /* the original h1 max parallel connections */
Index: modules/http2/h2_mplx.h
===================================================================
--- modules/http2/h2_mplx.h	(revision 1781889)
+++ modules/http2/h2_mplx.h	(working copy)
@@ -38,7 +38,7 @@
 struct apr_thread_mutex_t;
 struct apr_thread_cond_t;
 struct h2_bucket_beam;
-struct h2_config;
+struct h2_session;
 struct h2_ihash_t;
 struct h2_task;
 struct h2_stream;
@@ -124,9 +124,7 @@
  * Create the multiplexer for the given HTTP2 session. 
  * Implicitly has reference count 1.
  */
-h2_mplx *h2_mplx_create(conn_rec *c, apr_pool_t *master, 
-                        const struct h2_config *conf, 
-                        apr_interval_time_t stream_timeout,
+h2_mplx *h2_mplx_create(struct h2_session *session,
                         struct h2_workers *workers);
 
 /**
Index: modules/http2/h2_session.c
===================================================================
--- modules/http2/h2_session.c	(revision 1781889)
+++ modules/http2/h2_session.c	(working copy)
@@ -920,8 +920,7 @@
             return NULL;
         }
         
-        session->mplx = h2_mplx_create(c, session->pool, session->config, 
-                                       session->s->timeout, workers);
+        session->mplx = h2_mplx_create(session, workers);
         
         h2_mplx_set_consumed_cb(session->mplx, update_window, session);
         
Index: server/mpm/event/event.c
===================================================================
--- server/mpm/event/event.c	(revision 1781889)
+++ server/mpm/event/event.c	(working copy)
@@ -2098,6 +2098,7 @@
                     void *csd = NULL;
                     ap_listen_rec *lr = (ap_listen_rec *) pt->baton;
                     apr_pool_t *ptrans;         /* Pool for per-transaction stuff */
+                    apr_thread_mutex_t *mutex;
                     ap_pop_pool(&ptrans, worker_queue_info);
 
                     if (ptrans == NULL) {
@@ -2105,19 +2106,24 @@
                         apr_allocator_t *allocator;
 
                         apr_allocator_create(&allocator);
-                        apr_allocator_max_free_set(allocator,
-                                                   ap_max_mem_free);
-                        apr_pool_create_ex(&ptrans, pconf, NULL, allocator);
-                        apr_allocator_owner_set(allocator, ptrans);
-                        if (ptrans == NULL) {
+                        apr_allocator_max_free_set(allocator, ap_max_mem_free);
+                        rc = apr_pool_create_ex(&ptrans, pconf, NULL,
+                                                allocator);
+                        if (rc != APR_SUCCESS) {
                             ap_log_error(APLOG_MARK, APLOG_CRIT, rc,
                                          ap_server_conf, APLOGNO(03097)
                                          "Failed to create transaction pool");
+                            apr_allocator_destroy(allocator);
                             signal_threads(ST_GRACEFUL);
                             return NULL;
                         }
+                        apr_allocator_owner_set(allocator, ptrans);
+                        apr_pool_tag(ptrans, "transaction");
                     }
-                    apr_pool_tag(ptrans, "transaction");
+                    apr_thread_mutex_create(&mutex, APR_THREAD_MUTEX_DEFAULT,
+                                            ptrans);
+                    apr_allocator_mutex_set(apr_pool_allocator_get(ptrans),
+                                            mutex);
 
                     get_worker(&have_idle_worker, 1, &workers_were_busy);
                     rc = lr->accept_func(&csd, lr, ptrans);
