summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2011-05-20 20:05:14 +0000
committercorvid <corvid@lavabit.com>2011-05-20 20:05:14 +0000
commit6858882b56c87a1cde451939ca842b79dbc5122b (patch)
tree331b10d0195daf416aab5aa1c41eb84624a93aab
parent8ee4e287555853799195e9918e02797a3de51563 (diff)
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!
-rw-r--r--src/cache.c4
1 files changed, 4 insertions, 0 deletions
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);
}