Skip to content

Commit

Permalink
Fix memory allocation for server databases (#1046)
Browse files Browse the repository at this point in the history
Fix a bug in the way we allocate memory for the server databases
Introduced in #156.

Signed-off-by: Ran Shidlansik <[email protected]>
  • Loading branch information
ranshid authored Sep 18, 2024
1 parent ba71c7e commit 4593dc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2636,7 +2636,7 @@ void initServer(void) {
serverLog(LL_WARNING, "Failed creating the event loop. Error message: '%s'", strerror(errno));
exit(1);
}
server.db = zmalloc(sizeof(server) * server.dbnum);
server.db = zmalloc(sizeof(serverDb) * server.dbnum);

/* Create the databases, and initialize other internal state. */
int slot_count_bits = 0;
Expand Down

0 comments on commit 4593dc2

Please sign in to comment.