GSlice replacement in camel-mime-utils.c
Philip Van Hoof <[email protected]> Thu, 26 Oct 2006 12:55:59 +0200
| Newsgroups | gmane.comp.gnome.evolution.patches |
|---|---|
| Message-ID | <[email protected]> |
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 _______________________________________________ Evolution-patches mailing list [email protected] http://mail.gnome.org/mailman/listinfo/evolution-patches
camel-mime-utils.c.diff
(text/x-patch, 730 B)
--- /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--;