From 2f6a1860780771c428eb85eec622cb855b96263f Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 22 Oct 2008 13:22:00 +0200 Subject: [PATCH] Alloc a new packet if the queue is empty. Fix this. --- src/packet-queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/packet-queue.c b/src/packet-queue.c index da5ad3c9d8..7906ffaff1 100644 --- a/src/packet-queue.c +++ b/src/packet-queue.c @@ -28,7 +28,7 @@ Packet *PacketDequeue (PacketQueue *q) { Packet *p = q->bot; if (p == NULL) { /* queue empty, alloc a new packet */ - Packet *p = malloc(sizeof(Packet)); + p = malloc(sizeof(Packet)); if (p == NULL) { printf("ERROR: malloc failed: %s\n", strerror(errno)); return NULL;