summaryrefslogtreecommitdiffstats
path: root/src/mod_auth_gssapi.h
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2015-06-16 09:36:34 -0400
committerSimo Sorce <simo@redhat.com>2015-06-16 13:26:35 -0400
commit10d352bac12353efb5fe6e6efd2655e0562a1f8e (patch)
tree04aa53477b198be6948592cfed7cc089eb0d04d3 /src/mod_auth_gssapi.h
parentdb750842dd9e7bf2dd76bc9be91bbd4d045d3179 (diff)
downloadmod_auth_gssapi-10d352bac12353efb5fe6e6efd2655e0562a1f8e.tar.gz
mod_auth_gssapi-10d352bac12353efb5fe6e6efd2655e0562a1f8e.tar.xz
mod_auth_gssapi-10d352bac12353efb5fe6e6efd2655e0562a1f8e.zip
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 <simo@redhat.com>
Diffstat (limited to 'src/mod_auth_gssapi.h')
-rw-r--r--src/mod_auth_gssapi.h4
1 files changed, 3 insertions, 1 deletions
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);