diff src/prefs.c @ 6040:80e3641ee9eb

[gaim-migrate @ 6490] Various minor memleak fixes, and a rephrasing of an oscar error message. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sun, 06 Jul 2003 06:57:42 +0000
parents 96e0ac28d933
children dc42b27101c0
line wrap: on
line diff
--- a/src/prefs.c	Sun Jul 06 05:07:11 2003 +0000
+++ b/src/prefs.c	Sun Jul 06 06:57:42 2003 +0000
@@ -830,7 +830,9 @@
 		gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error reading prefs: %s\n",
 				error->message);
 		g_error_free(error);
+		g_free(filename);
 		prefs_is_loaded = TRUE;
+
 		return FALSE;
 	}
 
@@ -839,7 +841,9 @@
 	if(!g_markup_parse_context_parse(context, contents, length, NULL)) {
 		g_markup_parse_context_free(context);
 		g_free(contents);
+		g_free(filename);
 		prefs_is_loaded = TRUE;
+
 		return FALSE;
 	}
 
@@ -847,14 +851,15 @@
 		gaim_debug(GAIM_DEBUG_ERROR, "prefs", "Error parsing %s\n", filename);
 		g_markup_parse_context_free(context);
 		g_free(contents);
+		g_free(filename);
 		prefs_is_loaded = TRUE;
+
 		return FALSE;
 	}
 
+	gaim_debug(GAIM_DEBUG_INFO, "prefs", "Finished reading %s\n", filename);
 	g_markup_parse_context_free(context);
 	g_free(contents);
-
-	gaim_debug(GAIM_DEBUG_INFO, "prefs", "Finished reading %s\n", filename);
 	g_free(filename);
 	prefs_is_loaded = TRUE;