]> granicus.if.org Git - apache/commitdiff
Eliminate segfault we were seeing in mod_mem_cache when collecting an expired
authorBill Stoddard <stoddard@apache.org>
Mon, 17 Jun 2002 22:39:09 +0000 (22:39 +0000)
committerBill Stoddard <stoddard@apache.org>
Mon, 17 Jun 2002 22:39:09 +0000 (22:39 +0000)
entry from the cache. Ian?

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95737 13f79535-47bb-0310-9956-ffa450edef68

modules/experimental/cache_pqueue.c

index 297f8c7e75aa25d50f2337d8dd10a34cf02f6670..145be5b56b5b158483c162f6a952a78f0dbdbb7f 100644 (file)
@@ -177,8 +177,8 @@ apr_status_t cache_pq_remove(cache_pqueue_t *q, void* d)
     long pri_popped;
     long pri_removed;
 
-    posn  = q->get(d);
     popped = cache_pq_pop(q);
+    posn  = q->get(d);
 
     if (!popped)
         return APR_EGENERAL;
@@ -220,11 +220,11 @@ void *cache_pq_pop(cache_pqueue_t *q)
             break;
         }
         q->d[i] = q->d[j];
-        q->set(d, i);
+        q->set(q->d[i], i);
         i = j;
     }
     q->d[i] = tmp;
-    q->set(d, i);
+    q->set(q->d[i], i);
     return d;
 }