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-Tag: LMDB_0.9.17~106 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7f151b113738e0f94d6477c8028f3318fc34a2d9;p=openldap ITS#7377 mdb_env_init_meta(): Catch calloc error --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index b5d59bcdb1..087f19837b 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -3553,6 +3553,9 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta) mdb_env_init_meta0(env, meta); p = calloc(2, psize); + if (!p) + return ENOMEM; + p->mp_pgno = 0; p->mp_flags = P_META; *(MDB_meta *)METADATA(p) = *meta;