diff options
author | Stef Walter <stef@memberwebs.com> | 2008-06-27 22:00:08 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2008-06-27 22:00:08 +0000 |
commit | 77428f1a22e9be3d0488138ec1e3e37ffe7ea805 (patch) | |
tree | f83f0b8c30575245510596a023789f42575d92f5 | |
parent | d5f13e2ebe4db8fb64a93e26a3b853699e8977b1 (diff) |
Fix crashes when we cannot create a lock.
-rw-r--r-- | apache2x/mod_httpauth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apache2x/mod_httpauth.c b/apache2x/mod_httpauth.c index 58e6f2e..aac94eb 100644 --- a/apache2x/mod_httpauth.c +++ b/apache2x/mod_httpauth.c @@ -158,7 +158,7 @@ httpauth_initialize (apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_ rc = apr_global_mutex_create (&shared_lock, lock_name, APR_LOCK_DEFAULT, p); if (rc != APR_SUCCESS) ap_log_error (APLOG_MARK, APLOG_ERR, rc, s, - "httpauth: couldn't create shared memory lock"); + "httpauth: couldn't create shared memory lock: %s", lock_name); } if (file != NULL) @@ -190,7 +190,7 @@ shared_get_if_changed (httpauth_context_t *ctx, int version, httpauth_shared_t * httpauth_shared_t *block; int ret = 0; - if (!ctx->shared_block) + if (!ctx->shared_block || !shared_lock) return 0; apr_global_mutex_lock (shared_lock); @@ -212,7 +212,7 @@ shared_set_if_changed (httpauth_context_t *ctx, httpauth_shared_t *shared) { httpauth_shared_t *block; - if (!ctx->shared_block) + if (!ctx->shared_block || !shared_lock) return; apr_global_mutex_lock (shared_lock); |