diff --git a/src/queue.c b/src/queue.c index 74ba8e8..8a09180 100644 --- a/src/queue.c +++ b/src/queue.c @@ -7,7 +7,7 @@ queue * createQueue(void) { // Allocate the memory for the queue: - queue * newQueue = malloc(sizeof(queue)); + queue * newQueue = calloc(1, sizeof(queue)); // Instantiate the variables in the data-structure: newQueue->itemCount = 0;