diff options
author | Daniel Carl <danielcarl@gmx.de> | 2018-04-16 23:00:59 +0200 |
---|---|---|
committer | Daniel Carl <danielcarl@gmx.de> | 2018-04-16 23:00:59 +0200 |
commit | 9589c5694070a1134536e3d1858c82d7493e3a9e (patch) | |
tree | ec40a4b9b092a98b209f521e8089e22df74e9995 /src/handler.c | |
parent | a339ea6214bd5e2185051d0afbb5496b8d4a5fb7 (diff) |
Don't memory slices for single structs.
Diffstat (limited to 'src/handler.c')
-rw-r--r-- | src/handler.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handler.c b/src/handler.c index fd15d8e..c41e869 100644 --- a/src/handler.c +++ b/src/handler.c @@ -33,7 +33,7 @@ static char *handler_lookup(Handler *h, const char *uri); Handler *handler_new(void) { - Handler *h = g_slice_new(Handler); + Handler *h = g_new(Handler, 1); h->table = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); return h; @@ -45,7 +45,7 @@ void handler_free(Handler *h) g_hash_table_destroy(h->table); h->table = NULL; } - g_slice_free(Handler, h); + g_free(h); } gboolean handler_add(Handler *h, const char *key, const char *cmd) |