Don't leak an error

This commit is contained in:
William Jon McCann 2010-06-24 02:19:07 -04:00
parent 87ced33981
commit 23d7fc296a
1 changed files with 3 additions and 2 deletions

View File

@ -182,7 +182,6 @@ _notify_get_g_proxy (void)
/* lazily initialize D-Bus connection */ /* lazily initialize D-Bus connection */
error = NULL; error = NULL;
bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error); bus = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
if (error != NULL) { if (error != NULL) {
g_error_free (error); g_error_free (error);
return NULL; return NULL;
@ -295,7 +294,7 @@ notify_get_server_info (char **ret_name,
char **ret_version, char **ret_version,
char **ret_spec_version) char **ret_spec_version)
{ {
GError *error = NULL; GError *error;
DBusGProxy *proxy; DBusGProxy *proxy;
char *name; char *name;
char *vendor; char *vendor;
@ -307,6 +306,7 @@ notify_get_server_info (char **ret_name,
return FALSE; return FALSE;
} }
error = NULL;
if (!dbus_g_proxy_call (proxy, if (!dbus_g_proxy_call (proxy,
"GetServerInformation", "GetServerInformation",
&error, &error,
@ -316,6 +316,7 @@ notify_get_server_info (char **ret_name,
G_TYPE_STRING, &version, G_TYPE_STRING, &version,
G_TYPE_STRING, &spec_version, G_TYPE_STRING, &spec_version,
G_TYPE_INVALID)) { G_TYPE_INVALID)) {
g_error_free (error);
return FALSE; return FALSE;
} }