]> git.sommitrealweird.co.uk Git - onak.git/blobdiff - keydb_db4.c
Make keyd background itself by default
[onak.git] / keydb_db4.c
index e9dd5093d81f34511decf6629d9a3828f2923e7b..899075868b4d48df44cb4a49e2e6c03bcb1fb913 100644 (file)
@@ -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");