# HG changeset patch # User Elliott Sales de Andrade # Date 1249015372 0 # Node ID 080cfd84038c48ad2ddf7bef67053bb56e1a25a7 # Parent 0e49276d9ba1c77c2bd93c4e808b85710dd12432 Don't leak the GError from g_convert. diff -r 0e49276d9ba1 -r 080cfd84038c libpurple/protocols/msn/slpcall.c --- a/libpurple/protocols/msn/slpcall.c Fri Jul 31 04:21:30 2009 +0000 +++ b/libpurple/protocols/msn/slpcall.c Fri Jul 31 04:42:52 2009 +0000 @@ -217,10 +217,12 @@ || body_len <= 0 || strstr(body_str, "image/gif") == NULL) { - if (error != NULL) + if (error != NULL) { purple_debug_error("msn", "Unable to convert Ink header from UTF-16 to UTF-8: %s\n", error->message); + g_error_free(error); + } else purple_debug_error("msn", "Received Ink in unknown format\n"); @@ -234,9 +236,15 @@ &bytes_read, &bytes_written, &error); if (!body_str) { - purple_debug_error("msn", - "Unable to convert Ink body from UTF-16 to UTF-8: %s\n", - error->message); + if (error != NULL) { + purple_debug_error("msn", + "Unable to convert Ink body from UTF-16 to UTF-8: %s\n", + error->message); + g_error_free(error); + } + else + purple_debug_error("msn", + "Received Ink in unknown format\n"); return NULL; }