# HG changeset patch # User Sadrul Habib Chowdhury # Date 1255029331 0 # Node ID c4fa41bb1672b339dfaf38b668f4e2078084e87d # Parent c5e0b85c3145a4a6d2877fdaf01238ab2db229da Fixing leak is nice, but let's not crash in the process. diff -r c5e0b85c3145 -r c4fa41bb1672 libpurple/account.c --- a/libpurple/account.c Thu Oct 08 18:16:41 2009 +0000 +++ b/libpurple/account.c Thu Oct 08 19:15:31 2009 +0000 @@ -1052,8 +1052,10 @@ priv = PURPLE_ACCOUNT_GET_PRIVATE(account); PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error); - g_free(priv->current_error->description); - g_free(priv->current_error); + if (priv->current_error) { + g_free(priv->current_error->description); + g_free(priv->current_error); + } g_free(priv); PURPLE_DBUS_UNREGISTER_POINTER(account);