Fix memory allocation for server databases (#1046)
Fix a bug in the way we allocate memory for the server databases Introduced in #156. Signed-off-by: Ran Shidlansik <ranshid@amazon.com>
This commit is contained in:
parent
461a13ffc6
commit
3e83653afd
@ -2636,7 +2636,7 @@ void initServer(void) {
|
|||||||
serverLog(LL_WARNING, "Failed creating the event loop. Error message: '%s'", strerror(errno));
|
serverLog(LL_WARNING, "Failed creating the event loop. Error message: '%s'", strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
server.db = zmalloc(sizeof(server) * server.dbnum);
|
server.db = zmalloc(sizeof(serverDb) * server.dbnum);
|
||||||
|
|
||||||
/* Create the databases, and initialize other internal state. */
|
/* Create the databases, and initialize other internal state. */
|
||||||
int slot_count_bits = 0;
|
int slot_count_bits = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user