mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 02:36:19 +01:00
Fix some leaks in the GVDB builder
This commit is contained in:
parent
814c0fcaaf
commit
92c22e7ca7
@ -177,6 +177,14 @@ hash_table_new (gint n_buckets)
|
|||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
hash_table_free (HashTable *table)
|
||||||
|
{
|
||||||
|
g_free (table->buckets);
|
||||||
|
|
||||||
|
g_slice_free (HashTable, table);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hash_table_insert (gpointer key,
|
hash_table_insert (gpointer key,
|
||||||
gpointer value,
|
gpointer value,
|
||||||
@ -417,6 +425,8 @@ file_builder_add_hash (FileBuilder *fb,
|
|||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hash_table_free (mytable);
|
||||||
}
|
}
|
||||||
|
|
||||||
static FileBuilder *
|
static FileBuilder *
|
||||||
@ -472,6 +482,8 @@ file_builder_serialise (FileBuilder *fb,
|
|||||||
|
|
||||||
g_string_append_len (result, chunk->data, chunk->size);
|
g_string_append_len (result, chunk->data, chunk->size);
|
||||||
g_free (chunk->data);
|
g_free (chunk->data);
|
||||||
|
|
||||||
|
g_slice_free (FileChunk, chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_queue_free (fb->chunks);
|
g_queue_free (fb->chunks);
|
||||||
|
Loading…
Reference in New Issue
Block a user