--- a/pep.c Mon May 21 22:42:20 2012 +0300
+++ b/pep.c Sun Jul 22 15:45:05 2012 +0300
@@ -104,7 +104,7 @@
if (handler -> destroy_notify)
handler -> destroy_notify (handler -> data);
g_free (handler -> xmlns);
- g_free (handler);
+ g_slice_free (pep_handler_t, handler);
return;
}
@@ -164,7 +164,7 @@
void pep_register_xmlns_handler (const gchar *xmlns, pep_xmlns_handler_t handler, gpointer udata, GDestroyNotify notify)
{
- pep_handler_t *h = g_new (pep_handler_t, 1);
+ pep_handler_t *h = g_slice_new (pep_handler_t);
h->xmlns = g_strdup (xmlns);
h->handler = handler;