changeset 13113:7a05525e4197

[gaim-migrate @ 15475] As per Ethan's comments on gaim-devel, I'm reverting the stack -> heap allocation change. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 03 Feb 2006 18:30:27 +0000
parents f1ed04b5aa30
children c73c7dd0721f
files src/gtkutils.c
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutils.c	Fri Feb 03 04:43:06 2006 +0000
+++ b/src/gtkutils.c	Fri Feb 03 18:30:27 2006 +0000
@@ -1590,16 +1590,15 @@
 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);