From: Howard Chu Date: Mon, 4 Aug 2014 16:26:35 +0000 (-0700) Subject: ITS#7793 more for branch key update X-Git-Tag: OPENLDAP_REL_ENG_2_4_40~54^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ae0c9f484d4ac8530364b1681a1f1f56fbfea3af;p=openldap ITS#7793 more for branch key update --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index d8ac0406c6..dddfed1c66 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -6063,7 +6063,9 @@ fix_parent: if (mc->mc_top && !mc->mc_ki[mc->mc_top]) { unsigned short top = mc->mc_top; mc->mc_top--; - /* slot 0 is always an empty key, needs no update */ + /* slot 0 is always an empty key, find real slot */ + while (mc->mc_top && !mc->mc_ki[mc->mc_top]) + mc->mc_top--; if (mc->mc_ki[mc->mc_top]) rc2 = mdb_update_key(mc, key); else