From 6fc7da3c529ca7c610e8172f5b02980c75597dd5 Mon Sep 17 00:00:00 2001 From: rsc Date: Thu, 19 Oct 2006 21:58:59 +0000 Subject: Fix a handful of small one-time memory leaks in vbackup, and one per-package memory leak (in writethread). --- src/libventi/queue.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/libventi/queue.c') 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) { -- cgit v1.2.3