From: Ryan Lortie Date: Wed, 15 Dec 2010 16:36:14 +0000 (-0500) Subject: Fix some leaks in the GVDB builder X-Git-Tag: 2.27.93~13^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=92c22e7ca78670e35df9150169f6837c1dc1d99b;p=platform%2Fupstream%2Fglib.git Fix some leaks in the GVDB builder --- diff --git a/gvdb-builder.c b/gvdb-builder.c index fdd0ef4..4b48d80 100644 --- a/gvdb-builder.c +++ b/gvdb-builder.c @@ -178,6 +178,14 @@ hash_table_new (gint n_buckets) } static void +hash_table_free (HashTable *table) +{ + g_free (table->buckets); + + g_slice_free (HashTable, table); +} + +static void hash_table_insert (gpointer key, gpointer value, gpointer data) @@ -417,6 +425,8 @@ file_builder_add_hash (FileBuilder *fb, index++; } } + + hash_table_free (mytable); } static FileBuilder * @@ -472,6 +482,8 @@ file_builder_serialise (FileBuilder *fb, g_string_append_len (result, chunk->data, chunk->size); g_free (chunk->data); + + g_slice_free (FileChunk, chunk); } g_queue_free (fb->chunks);