From: Richard L. <rl...@us...> - 2006-02-03 18:30:37
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5739/src Modified Files: gtkutils.c Log Message: As per Ethan's comments on gaim-devel, I'm reverting the stack -> heap allocation change. Index: gtkutils.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkutils.c,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -p -r1.140 -r1.141 --- gtkutils.c 3 Feb 2006 03:51:08 -0000 1.140 +++ gtkutils.c 3 Feb 2006 18:30:27 -0000 1.141 @@ -1590,16 +1590,15 @@ static GdkPixbuf * overlay_status_onto_icon(GdkPixbuf *pixbuf, GaimStatusPrimitive primitive) { const char *type_name; - char *basename; + char basename[256]; char *filename; GdkPixbuf *emblem; type_name = gaim_primitive_get_id_from_type(primitive); - basename = g_strdup_printf("%s.png", type_name); + g_snprintf(basename, sizeof(basename), "%s.png", type_name); filename = g_build_filename(DATADIR, "pixmaps", "gaim", "status", "default", basename, NULL); - g_free(basename); emblem = gdk_pixbuf_new_from_file(filename, NULL); g_free(filename); |