From 76a5501fd67e8b677bc9bb8562c2c0d1f22a3201 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 29 Oct 1997 03:42:50 +0000 Subject: [PATCH] various MLK fixes --- src/client_side.cc | 4 +++- src/errorpage.cc | 4 +++- src/ipcache.cc | 5 ++--- src/store.cc | 4 +++- src/wais.cc | 3 +-- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/client_side.cc b/src/client_side.cc index 763bcfb658..8d79f28ce6 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.134 1997/10/26 02:35:29 wessels Exp $ + * $Id: client_side.cc,v 1.135 1997/10/28 20:42:50 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -219,6 +219,8 @@ icpHandleIMSReply(void *data, char *buf, ssize_t size) int unlink_request = 0; StoreEntry *oldentry; debug(33, 3) ("icpHandleIMSReply: FD %d '%s'\n", fd, entry->url); + put_free_4k_page(buf); + buf = NULL; /* unregister this handler */ if (entry->store_status == STORE_ABORTED) { debug(33, 3) ("icpHandleIMSReply: ABORTED '%s'\n", entry->url); diff --git a/src/errorpage.cc b/src/errorpage.cc index 649d1cc4aa..8d10d9f41c 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -1,6 +1,6 @@ /* - * $Id: errorpage.cc,v 1.87 1997/10/26 02:35:30 wessels Exp $ + * $Id: errorpage.cc,v 1.88 1997/10/28 20:42:50 wessels Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels @@ -92,6 +92,7 @@ errorStateFree(ErrorState * err) requestUnlink(err->request); safe_free(err->redirect_url); safe_free(err->url); + safe_free(err->host); cbdataFree(err); } @@ -274,6 +275,7 @@ errorAppendEntry(StoreEntry * entry, ErrorState * err) storeAppend(entry, buf, len); if (mem) mem->reply->code = err->http_status; + errorStateFree(err); } /* If there is a callback, the callback is responsible to close diff --git a/src/ipcache.cc b/src/ipcache.cc index 62003f41ff..43a05ee4ad 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.138 1997/10/27 22:48:56 wessels Exp $ + * $Id: ipcache.cc,v 1.139 1997/10/28 20:42:53 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -1143,8 +1143,7 @@ ipcache_restart(void) { ipcache_entry *this; ipcache_entry *next; - if (ip_table == 0) - fatal_dump("ipcache_restart: ip_table == 0\n"); + assert(ip_table != NULL); while (ipcacheDequeue()); next = (ipcache_entry *) hash_first(ip_table); while ((this = next)) { diff --git a/src/store.cc b/src/store.cc index d50d0ee754..2ea2fc3f21 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.321 1997/10/28 06:54:14 wessels Exp $ + * $Id: store.cc,v 1.322 1997/10/28 20:42:54 wessels Exp $ * * DEBUG: section 20 Storeage Manager * AUTHOR: Harvest Derived @@ -757,6 +757,8 @@ storeUnregister(StoreEntry * e, void *data) commSetSelect(sc->swapin_fd, COMM_SELECT_READ, NULL, NULL, 0); file_close(sc->swapin_fd); } + if (sc->callback) + debug(20,1)("WARNING: store_client for %s has a callback\n", e->url); cbdataFree(sc); return 1; } diff --git a/src/wais.cc b/src/wais.cc index b24d5e86a7..cc57d8133f 100644 --- a/src/wais.cc +++ b/src/wais.cc @@ -1,6 +1,6 @@ /* - * $Id: wais.cc,v 1.90 1997/10/26 02:35:41 wessels Exp $ + * $Id: wais.cc,v 1.91 1997/10/28 20:42:55 wessels Exp $ * * DEBUG: section 24 WAIS Relay * AUTHOR: Harvest Derived @@ -148,7 +148,6 @@ waisTimeout(int fd, void *data) err->http_status = HTTP_GATEWAY_TIMEOUT; err->request = urlParse(METHOD_CONNECT, waisState->request); errorAppendEntry(entry, err); - storeAbort(entry, 0); comm_close(fd); } -- 2.47.2