tests: zero test data

hooks need to be zeroed or else they causes crashes on _remove when the
remove callback is called.

Fixes #368
This commit is contained in:
Wim Taymans 2020-11-06 09:27:47 +01:00
parent 3fe31862ef
commit cd71b05fd0

View file

@ -382,6 +382,7 @@ static void test_endpoint(void)
uint8_t buffer[1024];
struct spa_pod_builder b = SPA_POD_BUILDER_INIT(buffer, 1024);
spa_zero(d);
d.loop = pw_main_loop_new(NULL);
d.context = pw_context_new(pw_main_loop_get_loop(d.loop), NULL, 0);
spa_assert(d.context != NULL);