aboutsummaryrefslogtreecommitdiff
path: root/src/libventi/queue.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-10-19 21:58:59 +0000
committerrsc <devnull@localhost>2006-10-19 21:58:59 +0000
commit6fc7da3c529ca7c610e8172f5b02980c75597dd5 (patch)
tree6e06f1a96414ceb59a8016fb257b46b6f87f9a1c /src/libventi/queue.c
parent067d852abe242ee1d267bcc0d652cd6bb31b7e17 (diff)
downloadplan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.tar.gz
plan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.tar.bz2
plan9port-6fc7da3c529ca7c610e8172f5b02980c75597dd5.zip
Fix a handful of small one-time memory leaks in vbackup,
and one per-package memory leak (in writethread).
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)
{