-- 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:
pfelt
2008-08-02 02:25:19 +00:00
parent f60f7ba979
commit 092a50fb56
+3 -1
View File
@@ -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);