From 6858882b56c87a1cde451939ca842b79dbc5122b Mon Sep 17 00:00:00 2001 From: corvid Date: Fri, 20 May 2011 20:05:14 +0000 Subject: free content/transfer decoder in Cache_entry_free This leak had long made occasional appearances in Jeremy's valgrind logs, and I supposed it was some complicated CCC interaction, and didn't want to put a band-aid over the problem without knowing why it's happening first. But now I finally dug into it, and I see it coming from aborting in Cache_process_queue() (not viewable, for instance), and then a_Cache_process_dbuf() never gets IOClose, which makes a lot of sense! --- src/cache.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/cache.c') diff --git a/src/cache.c b/src/cache.c index ee9f2218..d26ae610 100644 --- a/src/cache.c +++ b/src/cache.c @@ -311,6 +311,10 @@ static void Cache_entry_free(CacheEntry_t *entry) dStr_free(entry->UTF8Data, 1); if (entry->CharsetDecoder) a_Decode_free(entry->CharsetDecoder); + if (entry->TransferDecoder) + a_Decode_free(entry->TransferDecoder); + if (entry->ContentDecoder) + a_Decode_free(entry->ContentDecoder); dFree(entry); } -- cgit v1.2.3