test_server_setup: allocate two server-data blobs, for watches and timeouts
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 19 Jan 2011 17:33:31 +0000 (17:33 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 21 Jan 2011 14:22:39 +0000 (14:22 +0000)
commite529c4bcdbe51502662666c6cf8acae3e2446873
tree09210cb76d4b769b9cc94b6c338cbc6f084339ea
parentc894f62f2c33cd984805ec069ad3ca8684cbafe1
test_server_setup: allocate two server-data blobs, for watches and timeouts

This is similar to how ConnectionData works. Without this change, we
deserve to segfault: when the first set of callbacks (either watches or
timeouts) is cleaned up, we unref the server and loop, and free sd;
when the second set of callbacks is cleaned up, we use-after-free sd,
the server and the loop, then double-free sd.

However, due to fd.o #33277 we don't even get that far, because we've
already died with an assertion failure.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33277
test/test-utils.c