From 2ac35f0f2f61fd983c91f7e56219253eeea4d79a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 31 Jan 2014 15:22:16 -0600 Subject: [PATCH 1/1] libnm-glib: zero 'secrets' to prevent crash getting secrets If the GetSecrets call returned an error (eg, no secrets) then 'secrets' isn't set by dbus_g_proxy_end_call() and is garbage, then gets freed. (cherry picked from commit e922c120a3cf1bb3bd8def11bd0f23f1e18a0751) --- 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 35c5be8..f4640c3 100644 --- a/libnm-glib/nm-remote-connection.c +++ b/libnm-glib/nm-remote-connection.c @@ -313,7 +313,7 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_dat { RemoteCall *call = user_data; NMRemoteConnectionGetSecretsFunc func = (NMRemoteConnectionGetSecretsFunc) call->callback; - GHashTable *secrets; + GHashTable *secrets = NULL; GError *error = NULL; dbus_g_proxy_end_call (proxy, proxy_call, &error, -- 1.8.5.3