mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
hook: zero hooks before adding them
Clear the hook before adding it so that we are sure the removed callback doesn't contain garbage and cause a crash on disconnect. Mark the removed and priv fields as private. Make sure to add the removed callback after adding the hook. Fixes a crash in kwin
This commit is contained in:
parent
4d085816ef
commit
fc2b0b20ad
3 changed files with 9 additions and 7 deletions
|
|
@ -383,7 +383,6 @@ 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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue