libnm-glib/nm-client: zero the CheckConnectivityData structure

Otherwise, if the caller doesn't provide a cancellable we'll try to
access a bogus ccd->cancellable in check_connectivity_data_free() and
crash.

https://bugzilla.gnome.org/show_bug.cgi?id=740841
(cherry picked from commit 8c32ea916b)
This commit is contained in:
Rui Matos 2015-01-08 15:56:14 +01:00 committed by Thomas Haller
parent da31779f10
commit 01f358ec34

View file

@ -1548,7 +1548,7 @@ nm_client_check_connectivity_async (NMClient *client,
g_return_if_fail (NM_IS_CLIENT (client));
priv = NM_CLIENT_GET_PRIVATE (client);
ccd = g_slice_new (CheckConnectivityData);
ccd = g_slice_new0 (CheckConnectivityData);
ccd->client = client;
simple = g_simple_async_result_new (G_OBJECT (client), callback, user_data,