Mercurial > pidgin
changeset 5940:94ad4d45346a
[gaim-migrate @ 6380]
memleak fixen
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 22 Jun 2003 16:27:43 +0000 |
parents | 3014de25a8a4 |
children | a3e60ff95b7d |
files | src/html.c src/pounce.c src/prefs.c src/protocols/jabber/jabber.c |
diffstat | 4 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/html.c Sat Jun 21 13:35:23 2003 +0000 +++ b/src/html.c Sun Jun 22 16:27:43 2003 +0000 @@ -322,6 +322,8 @@ char *unescaped = g_strndup(q+1, o-q-1); \ char *escaped = g_markup_escape_text(unescaped, -1); \ g_string_append_printf(innards, "%c%s%c", *q, escaped, *q); \ + g_free(unescaped); \ + g_free(escaped); \ q = NULL; \ } else if(*c == '\\') { \ o++; \
--- a/src/pounce.c Sat Jun 21 13:35:23 2003 +0000 +++ b/src/pounce.c Sun Jun 22 16:27:43 2003 +0000 @@ -672,6 +672,7 @@ gaim_debug(GAIM_DEBUG_ERROR, "pounces", "Error reading pounces: %s\n", error->message); + g_free(filename); g_error_free(error); pounces_loaded = TRUE; @@ -686,6 +687,7 @@ if (!g_markup_parse_context_parse(context, contents, length, NULL)) { g_markup_parse_context_free(context); g_free(contents); + g_free(filename); pounces_loaded = TRUE; @@ -698,6 +700,7 @@ g_markup_parse_context_free(context); g_free(contents); + g_free(filename); pounces_loaded = TRUE; return FALSE; @@ -705,7 +708,6 @@ g_markup_parse_context_free(context); g_free(contents); - g_free(filename); pounces_loaded = TRUE;
--- a/src/prefs.c Sat Jun 21 13:35:23 2003 +0000 +++ b/src/prefs.c Sun Jun 22 16:27:43 2003 +0000 @@ -796,7 +796,8 @@ static void prefs_end_element_handler(GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error) { - if(!strcmp(element_name, "pref")) { + if(prefs_stack && !strcmp(element_name, "pref")) { + g_free(prefs_stack->data); prefs_stack = g_list_delete_link(prefs_stack, prefs_stack); } }