From 092a50fb564965afd229a0d3ab928f2a0fa07345 Mon Sep 17 00:00:00 2001 From: pfelt Date: Sat, 2 Aug 2008 02:25:19 +0000 Subject: [PATCH] -- one should not memset a struct before checking that the malloc didn't fail -- set client authorized to true so that queue agents can run all the commands they need to --- src/agents/queue/queue.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/agents/queue/queue.c b/src/agents/queue/queue.c index 4d40680..188b103 100644 --- a/src/agents/queue/queue.c +++ b/src/agents/queue/queue.c @@ -1498,13 +1498,15 @@ StartOver: /* set up the QueueClient */ client = QueueClientAlloc(); - memset(client, 0, sizeof(QueueClient)); if (!client) { LogFailureF("Cannot allocate %d bytes memory (entry %ld)", sizeof(QueueClient), entryID); FCLOSE_CHECK(fh); fh=NULL; continue; } + memset(client, 0, sizeof(QueueClient)); + client->authorized = TRUE; + /* connect to the waiting client */ client->conn = ConnAddressPoolConnect(&(CurrentPool->pool), 60000);