]> git.sur5r.net Git - openldap/commitdiff
ITS#7377 mdb_env_init_meta(): Catch calloc error
authorHallvard Furuseth <hallvard@openldap.org>
Sun, 23 Aug 2015 09:12:45 +0000 (11:12 +0200)
committerHallvard Furuseth <hallvard@openldap.org>
Sun, 23 Aug 2015 09:12:45 +0000 (11:12 +0200)
libraries/liblmdb/mdb.c

index 08aa9914ac8268e5fafb1ef7fd75d96af98b8823..5fc4fbcce62d00ffc18878687b4dd24de3e5c699 100644 (file)
@@ -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;