summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-01-30 10:40:51 +0100
committerThomas Haller <thaller@redhat.com>2014-01-30 10:40:51 +0100
commit97ededafd9ee510c492722cc7b86489714335430 (patch)
treea9ab5573a168b7bd34629b2e2bde5b6eea3e9a29
parentfbdca67baa0fadc6cba9788032c7363d11bc9e23 (diff)
downloadNetworkManager-97ededafd9ee510c492722cc7b86489714335430.tar.gz
libnm-glib: fix leak in nm_remote_connection_get_secrets
Signed-off-by: Thomas Haller <thaller@redhat.com>
-rw-r--r--libnm-glib/nm-remote-connection.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libnm-glib/nm-remote-connection.c b/libnm-glib/nm-remote-connection.c
index 27baebd095..35c5be8b2a 100644
--- a/libnm-glib/nm-remote-connection.c
+++ b/libnm-glib/nm-remote-connection.c
@@ -320,6 +320,8 @@ get_secrets_cb (DBusGProxy *proxy, DBusGProxyCall *proxy_call, gpointer user_dat
DBUS_TYPE_G_MAP_OF_MAP_OF_VARIANT, &secrets,
G_TYPE_INVALID);
(*func)(call->self, error ? NULL : secrets, error, call->user_data);
+ if (secrets)
+ g_hash_table_destroy (secrets);
g_clear_error (&error);
remote_call_complete (call->self, call);
}