From: Brian Pane Date: Sun, 28 Apr 2002 04:48:43 +0000 (+0000) Subject: Added a missing pool deletion case and simplified the conditionals X-Git-Tag: 2.0.36~56 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91aefd5c8fa1168cff67bbf5b6933f50ed4cf4b6;p=apache Added a missing pool deletion case and simplified the conditionals for the error-case return (thanks to Justin for suggesting the latter) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94829 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/worker/fdqueue.c b/server/mpm/worker/fdqueue.c index 673a3927a1..a7f9bc2857 100644 --- a/server/mpm/worker/fdqueue.c +++ b/server/mpm/worker/fdqueue.c @@ -311,15 +311,13 @@ apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p, } /* If we wake up and it's still empty, then we were interrupted */ if (ap_queue_empty(queue)) { - if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) { - if (delete_pool) { - apr_pool_destroy(recycled_pool); - } - return rv; - } + rv = apr_thread_mutex_unlock(queue->one_big_mutex); if (delete_pool) { apr_pool_destroy(recycled_pool); } + if (rv != APR_SUCCESS) { + return rv; + } if (queue->terminated) { return APR_EOF; /* no more elements ever again */ } @@ -342,11 +340,11 @@ apr_status_t ap_queue_pop(fd_queue_t *queue, apr_socket_t **sd, apr_pool_t **p, apr_thread_cond_signal(queue->not_full); } - if ((rv = apr_thread_mutex_unlock(queue->one_big_mutex)) != APR_SUCCESS) { - return rv; + rv = apr_thread_mutex_unlock(queue->one_big_mutex); + if (delete_pool) { + apr_pool_destroy(recycled_pool); } - - return APR_SUCCESS; + return rv; } apr_status_t ap_queue_interrupt_all(fd_queue_t *queue)