]> granicus.if.org Git - apache/commitdiff
Added a missing pool deletion case and simplified the conditionals
authorBrian Pane <brianp@apache.org>
Sun, 28 Apr 2002 04:48:43 +0000 (04:48 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 28 Apr 2002 04:48:43 +0000 (04:48 +0000)
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

server/mpm/worker/fdqueue.c

index 673a3927a1b31e9896c0f6b00e206082cd9e0800..a7f9bc285718c3c38a8bc03408b08bc49453d46d 100644 (file)
@@ -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)