more using g_slice_new() instead of g_new()
[dana/openbox.git] / openbox / actions / if.c
index dd86086..5f4a356 100644 (file)
@@ -37,7 +37,7 @@ static gpointer setup_func(xmlNodePtr node)
     xmlNodePtr n;
     Options *o;
 
-    o = g_new0(Options, 1);
+    o = g_slice_new0(Options);
 
     if ((n = obt_xml_find_node(node, "shaded"))) {
         if (obt_xml_node_bool(n))
@@ -113,7 +113,7 @@ static void free_func(gpointer options)
         o->elseacts = g_slist_delete_link(o->elseacts, o->elseacts);
     }
 
-    g_free(o);
+    g_slice_free(Options, o);
 }
 
 /* Always return FALSE because its not interactive */