From e4d9f0a9050f48a3a0b865289063c6a53afc42b3 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Sun, 23 Aug 2015 11:12:45 +0200 Subject: [PATCH] lmdb: ITS#7377 catch calloc error in mdb_env_init_meta(). Change-Id: I2b1a4ec9f86a3a7844b157863d18ce81be400cef --- mdb.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mdb.c b/mdb.c index 0c7397c2..83e47f51 100644 --- a/mdb.c +++ b/mdb.c @@ -3978,6 +3978,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 *)PAGEDATA(p) = *meta;