module-avb: internal: destroy internal descriptors

This commit is contained in:
hackerman-kl 2025-11-28 09:01:14 +01:00 committed by Wim Taymans
parent a3ce0f3e28
commit b60623df4d
4 changed files with 13 additions and 16 deletions

View file

@ -83,7 +83,18 @@ struct server {
#include "stream.h"
static inline struct descriptor *server_find_descriptor(struct server *server,
static inline void server_destroy_descriptors(struct server *server)
{
struct descriptor *d, *t;
spa_list_for_each_safe(d, t, &server->descriptors, link) {
free(d->ptr);
spa_list_remove(&d->link);
free(d);
}
}
static inline const struct descriptor *server_find_descriptor(struct server *server,
uint16_t type, uint16_t index)
{
struct descriptor *d;