Mercurial > pidgin
changeset 28132:b9a54fa6add2
GSList internally doesn't use the same allocator as gmalloc. Refs #400.
In particular, GSList in newer versions of GLib uses the slice allocator,
which is probably where this crash is coming from.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Sat, 29 Aug 2009 22:04:20 +0000 |
parents | 49308951822a |
children | 2858857f457b |
files | pidgin/plugins/gestures/stroke.c |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pidgin/plugins/gestures/stroke.c Sat Aug 29 03:03:00 2009 +0000 +++ b/pidgin/plugins/gestures/stroke.c Sat Aug 29 22:04:20 2009 +0000 @@ -207,10 +207,7 @@ metrics->max_x = -1; metrics->max_y = -1; - metrics->pointList = (GSList*) g_malloc (sizeof (GSList)); - - metrics->pointList->data = new_point_p; - metrics->pointList->next = NULL; + metrics->pointList = g_slist_prepend(metrics->pointList, new_point_p); metrics->point_count = 0; } else {