diff options
author | Isaac Boukris <iboukris@gmail.com> | 2015-06-14 22:34:28 +0300 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-06-14 17:48:54 -0400 |
commit | 8c089a89fae54236c7e05c8e153ecf1a75e27bbf (patch) | |
tree | 143b869ea80e55218930428bc1e1437c4c88596b /src | |
parent | 4160a7799f7bd642827f72c6af0fb79c660c2234 (diff) | |
download | mod_auth_gssapi-8c089a89fae54236c7e05c8e153ecf1a75e27bbf.tar.gz mod_auth_gssapi-8c089a89fae54236c7e05c8e153ecf1a75e27bbf.tar.xz mod_auth_gssapi-8c089a89fae54236c7e05c8e153ecf1a75e27bbf.zip |
Use apr_pool_cleanup_register() to cleanup mc
Instead of using apr_pool_userdata_set() since we don't use apr_pool_userdata_get() with the mag_conn_ptr apr_pool_cleanup_register() seem cleaner.
Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_auth_gssapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_auth_gssapi.c b/src/mod_auth_gssapi.c index f0fa83f..39d63a5 100644 --- a/src/mod_auth_gssapi.c +++ b/src/mod_auth_gssapi.c @@ -424,8 +424,8 @@ static int mag_auth(request_rec *req) if (mc) { /* register the context in the memory pool, so it can be freed * when the connection/request is terminated */ - apr_pool_userdata_set(mc, "mag_conn_ptr", - mag_conn_destroy, mc->parent); + apr_pool_cleanup_register(mc->parent, (void *) mc, + mag_conn_destroy, apr_pool_cleanup_null); if (mc->established && !auth_header) { ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, req, |