diff options
author | Thomas Haller <thaller@redhat.com> | 2014-07-27 04:37:12 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2014-08-01 13:07:38 +0200 |
commit | d6b3ef0819dde4e6bc514b815f6259f1eaffa150 (patch) | |
tree | 5e4e344d4200ede9e4b10d4a456d10dcddada362 /libnm-glib/tests/test-remote-settings-client.c | |
parent | fa809c2636c7d061c598fe84bbc2aa6fcb0e32b1 (diff) | |
download | NetworkManager-d6b3ef0819dde4e6bc514b815f6259f1eaffa150.tar.gz |
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>
Diffstat (limited to 'libnm-glib/tests/test-remote-settings-client.c')
-rw-r--r-- | libnm-glib/tests/test-remote-settings-client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libnm-glib/tests/test-remote-settings-client.c b/libnm-glib/tests/test-remote-settings-client.c index da1d632aca..0019fc1c18 100644 --- a/libnm-glib/tests/test-remote-settings-client.c +++ b/libnm-glib/tests/test-remote-settings-client.c @@ -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)) { |