I just committed a fix to servers/slapd/back-bdb/modify.c (1.109) that solves the problem for me. It seems that the copy of e_attrs (created by bdb_modify_internal) was not disposed when a transaction had to be retried.