2
0
Fork 0

memcached.c: fix endless loops

personal/stbuehler/wip
Stefan Bühler 2010-07-18 21:22:45 +02:00
parent 0b5a67b2a6
commit d498a9fee9
1 changed files with 2 additions and 1 deletions

View File

@ -121,6 +121,7 @@ static void send_queue_clean(GQueue *queue) {
send_item *i;
while (NULL != (i = g_queue_peek_head(queue))) {
if (i->len != 0) return;
g_queue_pop_head(queue);
li_buffer_release(i->buf);
g_slice_free(send_item, i);
}
@ -128,7 +129,7 @@ static void send_queue_clean(GQueue *queue) {
static void send_queue_reset(GQueue *queue) {
send_item *i;
while (NULL != (i = g_queue_peek_head(queue))) {
while (NULL != (i = g_queue_pop_head(queue))) {
li_buffer_release(i->buf);
g_slice_free(send_item, i);
}