-- 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
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user