diff --git a/girepository/gthash.c b/girepository/gthash.c index 4a23e4ace..bc1c22a53 100644 --- a/girepository/gthash.c +++ b/girepository/gthash.c @@ -131,6 +131,7 @@ gi_typelib_hash_builder_prepare (GITypelibHashBuilder *builder) builder->dirmap_offset = ALIGN_VALUE (offset, 4); builder->packed_size = builder->dirmap_offset + (num_elts * sizeof(guint16)); out: + g_strfreev (strs); cmph_config_destroy (config); cmph_io_vector_adapter_destroy (io); return builder->buildable; diff --git a/girepository/gthash-test.c b/girepository/tests/gthash.c similarity index 99% rename from girepository/gthash-test.c rename to girepository/tests/gthash.c index ac55db91d..1b5dce115 100644 --- a/girepository/gthash-test.c +++ b/girepository/tests/gthash.c @@ -53,6 +53,8 @@ test_build_retrieve (void) g_assert (gi_typelib_hash_search (buf, "ZLibDecompressor", 4) == 42); g_assert (gi_typelib_hash_search (buf, "VolumeMonitor", 4) == 9); g_assert (gi_typelib_hash_search (buf, "FileMonitorFlags", 4) == 31); + + g_free (buf); } int diff --git a/girepository/tests/meson.build b/girepository/tests/meson.build index a3386a166..c89a8660e 100644 --- a/girepository/tests/meson.build +++ b/girepository/tests/meson.build @@ -3,6 +3,7 @@ girepository_tests = {} # Some GIR files are needed to test against if enable_gir girepository_tests += { + 'gthash' : {}, 'repository' : { 'depends': [glib_gir, gobject_gir], },