diff src/c/queue.c @ 1330:452b14d88a10

fix small memory leaks
author Marc Weber <marco-oweber@gmx.de>
date Sun, 05 Dec 2010 18:47:54 +0100
parents 236dc296c32d
children
line wrap: on
line diff
--- a/src/c/queue.c	Sat Dec 11 11:00:05 2010 -0500
+++ b/src/c/queue.c	Sun Dec 05 18:47:54 2010 +0100
@@ -29,8 +29,11 @@
 
 static int dequeue() {
   int ret = front->fd;
+  node n = front->next;
+  free(front);
 
-  front = front->next;
+  front = n;
+
   if (!front)
     back = NULL;