mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-04 18:44:13 +08:00
lmdb: ITS#7377 catch calloc error in mdb_env_init_meta().
Change-Id: I2b1a4ec9f86a3a7844b157863d18ce81be400cef
This commit is contained in:
parent
73941be79a
commit
e4d9f0a905
2
mdb.c
2
mdb.c
@ -3978,6 +3978,8 @@ mdb_env_init_meta(MDB_env *env, MDB_meta *meta)
|
|||||||
psize = env->me_psize;
|
psize = env->me_psize;
|
||||||
|
|
||||||
p = calloc(NUM_METAS, psize);
|
p = calloc(NUM_METAS, psize);
|
||||||
|
if (!p)
|
||||||
|
return ENOMEM;
|
||||||
p->mp_pgno = 0;
|
p->mp_pgno = 0;
|
||||||
p->mp_flags = P_META;
|
p->mp_flags = P_META;
|
||||||
*(MDB_meta *)PAGEDATA(p) = *meta;
|
*(MDB_meta *)PAGEDATA(p) = *meta;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user