Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1329:9be9da2df74b | 1330:452b14d88a10 |
---|---|
27 back = n; | 27 back = n; |
28 } | 28 } |
29 | 29 |
30 static int dequeue() { | 30 static int dequeue() { |
31 int ret = front->fd; | 31 int ret = front->fd; |
32 node n = front->next; | |
33 free(front); | |
32 | 34 |
33 front = front->next; | 35 front = n; |
36 | |
34 if (!front) | 37 if (!front) |
35 back = NULL; | 38 back = NULL; |
36 | 39 |
37 return ret; | 40 return ret; |
38 } | 41 } |