diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 08aa991..5fc4fbc 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;