X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/ace576243765fb10ed37dc3ec4b040becd4c9542..9c96da2b288cebb53388ad4e30adbe9b87f67d91:/keydb_db4.c?ds=inline diff --git a/keydb_db4.c b/keydb_db4.c index e9dd509..8990758 100644 --- a/keydb_db4.c +++ b/keydb_db4.c @@ -314,7 +314,7 @@ static void db4_initdb(bool readonly) } } - dbconns = malloc(sizeof (DB *) * numdbs); + dbconns = calloc(numdbs, sizeof (DB *)); if (dbconns == NULL) { logthing(LOGTHING_CRITICAL, "Couldn't allocate memory for dbconns");