X-Git-Url: https://git.sommitrealweird.co.uk/onak.git/blobdiff_plain/ace576243765fb10ed37dc3ec4b040becd4c9542..8d14d66b84cc370cefe54b33de1b95bb49c90bf6:/keydb_db4.c?ds=sidebyside 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");