[evolution-patches] GSlice replacement in camel-mime-utils.c



I'm adding this one to the gslice tracker:
http://bugzilla.gnome.org/show_bug.cgi?id=363156

-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
blog: http://pvanhoof.be/blog
--- /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/camel-mime-utils.c	2006-10-19 12:20:00.000000000 +0200
+++ camel-mime-utils.c	2006-10-26 12:52:40.000000000 +0200
@@ -2209,12 +2209,13 @@
 CamelContentType *
 camel_content_type_new(const char *type, const char *subtype)
 {
-	CamelContentType *t = g_malloc(sizeof(*t));
+	CamelContentType *t = g_slice_new (CamelContentType);
 
 	t->type = g_strdup(type);
 	t->subtype = g_strdup(subtype);
 	t->params = NULL;
 	t->refcount = 1;
+
 	return t;
 }
 
@@ -2247,7 +2248,7 @@
 			camel_header_param_list_free(ct->params);
 			g_free(ct->type);
 			g_free(ct->subtype);
-			g_free(ct);
+			g_slice_free (CamelContentType, ct);
 			ct = NULL;
 		} else {
 			ct->refcount--;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]