[syslog-ng] Question regarding lib/nvtable.c (FAIL: test_nvtable)

John Skopis jspam at skopis.com
Sat Jul 21 00:46:55 CEST 2012


I just tried to rebuild the EPEL6 SRPM for syslog-ng.

The build fails on make check because the test_nvtable test fails.

Forgive me if the solution has already been posted. I was able to find
a post, but it linked to a few RH bugs suggesting improper use of
g_hash_table_insert in nv_registry_alloc_handle(nvtable.c).

I looked at nvtable.c and noticed the hash is created:

g_hash_table_new_full(g_str_hash, g_str_equal, NULL, NULL)

Then, in nv_registry_free:

  for (i = 0; i < self->names->len; i++)
    g_free(g_array_index(self->names, NVHandleDesc, i).name);
  g_array_free(self->names, TRUE);

I am wondering if there is a good reason not to pass in g_free as the
"key_destroy_func" to g_hash_table_new_full


More information about the syslog-ng mailing list