module-avb: adp: clean the allocated resources if any

This commit is contained in:
hackerman-kl 2025-11-28 08:52:11 +01:00 committed by Wim Taymans
parent 2ff45313de
commit 8d99bf66bd

View file

@ -156,7 +156,14 @@ static int adp_message(void *data, uint64_t now, const void *message, int len)
static void adp_destroy(void *data) static void adp_destroy(void *data)
{ {
struct adp *adp = data; struct adp *adp = data;
struct entity *e, *t;
spa_hook_remove(&adp->server_listener); spa_hook_remove(&adp->server_listener);
spa_list_for_each_safe(e, t, &adp->entities, link) {
entity_free(e);
}
free(adp); free(adp);
} }