# HG changeset patch # User Myhailo Danylenko # Date 1263379437 -7200 # Node ID dcb0b4522ded91a7c7aa547c7553bf2f169c45a3 # Parent 63ebb1d32c7d559cf5c110fcdaf343df9f73b891 Fix GError handling diff -r 63ebb1d32c7d -r dcb0b4522ded mcabber/src/screen.c --- a/mcabber/src/screen.c Sat Dec 12 16:23:21 2009 +0200 +++ b/mcabber/src/screen.c Wed Jan 13 12:43:57 2010 +0200 @@ -2043,14 +2043,13 @@ static inline void scr_LogUrls(const gchar *string) { GMatchInfo *match_info; - GError *error = NULL; - - g_regex_match_full(url_regex, string, -1, 0, 0, &match_info, &error); + + g_regex_match_full(url_regex, string, -1, 0, 0, &match_info, NULL); while (g_match_info_matches(match_info)) { gchar *url = g_match_info_fetch(match_info, 0); scr_print_logwindow(url); g_free(url); - g_match_info_next(match_info, &error); + g_match_info_next(match_info, NULL); } g_match_info_free(match_info); } diff -r 63ebb1d32c7d -r dcb0b4522ded mcabber/src/xmpp.c --- a/mcabber/src/xmpp.c Sat Dec 12 16:23:21 2009 +0200 +++ b/mcabber/src/xmpp.c Wed Jan 13 12:43:57 2010 +0200 @@ -854,7 +854,7 @@ static void connection_open_cb(LmConnection *connection, gboolean success, gpointer user_data) { - GError *error; + GError *error = NULL; if (success) { const char *password, *resource; @@ -870,6 +870,7 @@ connection_auth_cb, NULL, FALSE, &error)) { scr_LogPrint(LPRINT_LOGNORM, "Failed to authenticate: %s\n", error->message); + g_error_free (error); _try_to_reconnect(); } g_free(username); @@ -1750,6 +1751,7 @@ NULL, FALSE, &error)) { _try_to_reconnect(); scr_LogPrint(LPRINT_LOGNORM, "Failed to open: %s\n", error->message); + g_error_free (error); } }