diff src/dialogs.c @ 308:e5fa88351dc8

[gaim-migrate @ 318] Hopefully a few memleak fixes. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 02 Jun 2000 05:22:08 +0000
parents b32c83750104
children 0a8b4edc4732
line wrap: on
line diff
--- a/src/dialogs.c	Thu Jun 01 19:46:59 2000 +0000
+++ b/src/dialogs.c	Fri Jun 02 05:22:08 2000 +0000
@@ -1963,10 +1963,8 @@
 	
 	if (c)
 	{
-		g_free(c->current_fontname);
-		g_free(c->current_fontface);
-		c->current_fontface = g_malloc(64);
-		c->current_fontname = gtk_font_selection_get_font_name(fontsel);
+		char *tmp = gtk_font_selection_get_font_name(fontsel);
+		strncpy(c->current_fontname, tmp, sizeof(c->current_fontname));
 
 		for (i = 0; i < strlen(c->current_fontname); i++)
 		{