aboutsummaryrefslogtreecommitdiffstats
path: root/storage_xml.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2006-06-21 19:14:49 +0200
committerWilmer van der Gaast <wilmer@gaast.net>2006-06-21 19:14:49 +0200
commit00ab35016e3646aa936ae0c3d7a8531ec68d6f24 (patch)
treebcf19052c57f170e36bf8e9cce3275f4f117307b /storage_xml.c
parent2b14eef99faf7e113cc6c17d68bf6402f87ddd66 (diff)
Fixed GError memory leak, correctly setting the migrate_storage default.
Diffstat (limited to 'storage_xml.c')
-rw-r--r--storage_xml.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/storage_xml.c b/storage_xml.c
index 69e991d2..41a50d8c 100644
--- a/storage_xml.c
+++ b/storage_xml.c
@@ -287,16 +287,22 @@ static storage_status_t xml_load_real( const char *my_nick, const char *password
/* Slightly dirty... */
if( gerr && strcmp( gerr->message, XML_PASS_ERRORMSG ) == 0 )
+ {
+ g_clear_error( &gerr );
return STORAGE_INVALID_PASSWORD;
+ }
else
{
if( gerr && irc )
irc_usermsg( irc, "Error from XML-parser: %s", gerr->message );
+ g_clear_error( &gerr );
return STORAGE_OTHER_ERROR;
}
}
}
+ /* Just to be sure... */
+ g_clear_error( &gerr );
g_markup_parse_context_free( ctx );
close( fd );