aboutsummaryrefslogtreecommitdiff
path: root/src/libventi/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libventi/queue.c')
-rw-r--r--src/libventi/queue.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/libventi/queue.c b/src/libventi/queue.c
index 6e9bfa8d..3a1f6ea5 100644
--- a/src/libventi/queue.c
+++ b/src/libventi/queue.c
@@ -29,6 +29,20 @@ _vtqalloc(void)
return q;
}
+void
+_vtqfree(Queue *q)
+{
+ Qel *e;
+
+ /* Leaks the pointers e->p! */
+ while(q->head){
+ e = q->head;
+ q->head = e->next;
+ free(e);
+ }
+ free(q);
+}
+
int
_vtqsend(Queue *q, void *p)
{