From 10d352bac12353efb5fe6e6efd2655e0562a1f8e Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 16 Jun 2015 09:36:34 -0400 Subject: Improve mag_conn memory handling Create a pool just for the mag_conn structure, so that we can clear up all the memory used when a reset is necessary. This also fixes a segfault introduced by a previous patch where we mistakenly zeroed the whole structure including the memory pool pointer, which needs to be preserved. Closes #40 Signed-off-by: Simo Sorce --- src/mod_auth_gssapi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mod_auth_gssapi.h') diff --git a/src/mod_auth_gssapi.h b/src/mod_auth_gssapi.h index 00765c4..b606803 100644 --- a/src/mod_auth_gssapi.h +++ b/src/mod_auth_gssapi.h @@ -60,7 +60,7 @@ struct mag_config { }; struct mag_conn { - apr_pool_t *parent; + apr_pool_t *pool; gss_ctx_id_t ctx; bool established; const char *user_name; @@ -72,3 +72,5 @@ struct mag_conn { }; #define discard_const(ptr) ((void *)((uintptr_t)(ptr))) + +struct mag_conn *mag_new_conn_ctx(apr_pool_t *pool); -- cgit