From: Hallvard Furuseth Date: Sun, 23 Aug 2015 09:12:45 +0000 (+0200) Subject: ITS#7377 mdb_env_init_meta(): Catch calloc error X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e9e3c9fb514a9eaf6f8436e1683dca78c12b15de;p=openldap ITS#7377 mdb_env_init_meta(): Catch calloc error --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 08aa9914ac..5fc4fbcce6 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -3695,6 +3695,8 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta) psize = env->me_psize; p = calloc(NUM_METAS, psize); + if (!p) + return ENOMEM; p->mp_pgno = 0; p->mp_flags = P_META; *(MDB_meta *)METADATA(p) = *meta;