changeset 2071:cb8fdc69103d

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!
author corvid <corvid@lavabit.com>
date Fri, 20 May 2011 20:05:14 +0000
parents 5e0654968e3c
children 8abe97ebb6e3
files src/cache.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cache.c	Mon May 02 02:39:47 2011 +0000
+++ b/src/cache.c	Fri May 20 20:05:14 2011 +0000
@@ -311,6 +311,10 @@
    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);
 }