From fe869a35e6c8481c20b26ca3eb5ae913a7d0f9c1 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Wed, 21 Jul 2010 15:37:53 -0700 Subject: [PATCH] libnm-glib: ensure invalids secrets hash isn't used on error condition Apparently dbus-glib just sends through a random address for the hash table even if 'error' is set. Make sure we don't pass that down to subclasses. --- libnm-glib/nm-remote-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c index 5d104d068..1039a7d18 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -164,7 +164,7 @@ get_secrets_cb (DBusGProxy *proxy, GHashTable *secrets, GError *error, gpointer RemoteCall *call = user_data; NMSettingsConnectionInterfaceGetSecretsFunc func = (NMSettingsConnectionInterfaceGetSecretsFunc) call->callback; - (*func)(NM_SETTINGS_CONNECTION_INTERFACE (call->self), secrets, error, call->user_data); + (*func)(NM_SETTINGS_CONNECTION_INTERFACE (call->self), error ? NULL : secrets, error, call->user_data); remote_call_complete (call->self, call); }