summaryrefslogtreecommitdiff
path: root/src/dicache.c
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2009-01-05 09:41:14 -0300
committerJorge Arellano Cid <jcid@dillo.org>2009-01-05 09:41:14 -0300
commitcb79d2d228695b68780eb3e90739cb7f99726c5a (patch)
treebf0b225b7f3e49154920c34b01cb4ccf01fc53c3 /src/dicache.c
parentdab010550e29eaad6120a0f7e11aab413687d656 (diff)
Fix a segfault with a debug MSG.
Diffstat (limited to 'src/dicache.c')
-rw-r--r--src/dicache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dicache.c b/src/dicache.c
index 975b6a10..1c546e98 100644
--- a/src/dicache.c
+++ b/src/dicache.c
@@ -356,6 +356,9 @@ void a_Dicache_close(DilloUrl *url, int version, CacheClient_t *Client)
dReturn_if_fail ( DicEntry != NULL );
+ /* a_Dicache_unref() may free DicEntry */
+ MSG("a_Dicache_close RefCount=%d\n", DicEntry->RefCount - 1);
+
if (DicEntry->State < DIC_Close) {
DicEntry->State = DIC_Close;
dFree(DicEntry->cmap);
@@ -364,7 +367,6 @@ void a_Dicache_close(DilloUrl *url, int version, CacheClient_t *Client)
DicEntry->DecoderData = NULL;
}
a_Dicache_unref(url, version);
- MSG("a_Dicache_close RefCount=%d\n", DicEntry->RefCount);
a_Bw_close_client(Web->bw, Client->Key);
}