libnm-glib/test: fix crash in test-remote-settings-client

test_make_invisible() forgot to disconnect handler invis_removed_cb().
Later, during test_remove_connection(), the connection will be eventually
removed and the callback will corrupt the stack by writing to the '&done'
user data.

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-07-27 04:37:12 +02:00
parent fa809c2636
commit d6b3ef0819

View file

@ -186,6 +186,8 @@ test_make_invisible (void)
} while ((done == FALSE) && (now - start < 5));
test_assert (done == TRUE);
g_signal_handlers_disconnect_by_func (remote, G_CALLBACK (invis_removed_cb), &done);
/* Ensure NMRemoteSettings no longer has the connection */
list = nm_remote_settings_list_connections (settings);
for (iter = list; iter; iter = g_slist_next (iter)) {