mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-13 04:27:51 -05:00
module-avb: acmp: cleaning pending allocated resources on destroy
This commit is contained in:
parent
8d99bf66bd
commit
c1dbba1a31
1 changed files with 11 additions and 0 deletions
|
|
@ -79,6 +79,16 @@ static void pending_free(struct acmp *acmp, struct pending *p)
|
|||
free(p);
|
||||
}
|
||||
|
||||
static void pending_destroy(struct acmp *acmp)
|
||||
{
|
||||
struct pending *p, *t;
|
||||
for (uint32_t list_id = 0; list_id < PENDING_CONTROLLER; list_id++) {
|
||||
spa_list_for_each_safe(p, t, &acmp->pending[list_id], link) {
|
||||
pending_free(acmp, p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct msg_info {
|
||||
uint16_t type;
|
||||
const char *name;
|
||||
|
|
@ -409,6 +419,7 @@ static void acmp_destroy(void *data)
|
|||
{
|
||||
struct acmp *acmp = data;
|
||||
spa_hook_remove(&acmp->server_listener);
|
||||
pending_destroy(acmp);
|
||||
free(acmp);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue