]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
MEM_4K_BUF leaks!
authorwessels <>
Tue, 21 Jul 1998 01:24:58 +0000 (01:24 +0000)
committerwessels <>
Tue, 21 Jul 1998 01:24:58 +0000 (01:24 +0000)
src/client_side.cc

index f4eed42a684979cfa7c1a905456090de28ac8c0e..7a96fd37b450f6e7e659213336d864dd408aaef2 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.357 1998/07/20 17:19:28 wessels Exp $
+ * $Id: client_side.cc,v 1.358 1998/07/20 19:24:58 wessels Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1171,8 +1171,10 @@ clientCacheHit(void *data, char *buf, ssize_t size)
         * punt to clientProcessMiss.
         */
        if (e->mem_status == IN_MEMORY) {
+           memFree(MEM_4K_BUF, buf);
            clientProcessMiss(http);
        } else if (size == SM_PAGE_SIZE && http->out.offset == 0) {
+           memFree(MEM_4K_BUF, buf);
            clientProcessMiss(http);
        } else {
            debug(33, 3) ("clientCacheHit: waiting for HTTP reply headers\n");
@@ -1204,6 +1206,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
            http->log_type = LOG_TCP_MISS;
            clientProcessMiss(http);
        }
+       memFree(MEM_4K_BUF, buf);
     } else if (EBIT_TEST(r->flags, REQ_IMS)) {
        /*
         * Handle If-Modified-Since requests from the client
@@ -1211,6 +1214,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
        if (mem->reply->sline.status != HTTP_OK) {
            debug(33, 4) ("clientCacheHit: Reply code %d != 200\n",
                mem->reply->sline.status);
+           memFree(MEM_4K_BUF, buf);
            clientProcessMiss(http);
        } else if (modifiedSince(e, http->request)) {
            http->log_type = LOG_TCP_IMS_MISS;
@@ -1218,6 +1222,7 @@ clientCacheHit(void *data, char *buf, ssize_t size)
        } else {
            MemBuf mb = httpPacked304Reply(e->mem_obj->reply);
            http->log_type = LOG_TCP_IMS_HIT;
+           memFree(MEM_4K_BUF, buf);
            storeUnregister(e, http);
            storeUnlockObject(e);
            e = clientCreateStoreEntry(http, http->request->method, 0);