diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c
index 843de82..d39bbab 100644
--- a/profiles/audio/avctp.c
+++ b/profiles/audio/avctp.c
return NULL;
}
-static void pending_destroy(void *data)
+static void pending_destroy(gpointer data, gpointer user_data)
{
struct avctp_pending_req *req = data;
g_source_remove(chan->process_id);
g_free(chan->buffer);
- g_queue_free_full(chan->queue, pending_destroy);
- g_slist_free_full(chan->processed, pending_destroy);
+ g_queue_foreach(chan->queue, pending_destroy, NULL);
+ g_queue_free(chan->queue);
+ g_slist_foreach(chan->processed, pending_destroy, NULL);
+ g_slist_free(chan->processed);
g_slist_free_full(chan->handlers, g_free);
g_free(chan);
}
p->timeout = 0;
- pending_destroy(p);
+ pending_destroy(p, NULL);
chan->p = NULL;
if (chan->process_id == 0)
if (p->process(p->data) == 0)
break;
- pending_destroy(p);
+ pending_destroy(p, NULL);
}
if (p == NULL)
return;
control->processed = g_slist_remove(control->processed, p);
- pending_destroy(p);
+ pending_destroy(p, NULL);
return;
}