mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-24 00:29:35 -05:00
Fix entry_alloc with no attrs
This commit is contained in:
parent
0e96868e8e
commit
04311cc716
1 changed files with 6 additions and 2 deletions
|
|
@ -177,8 +177,12 @@ static Entry * mdb_entry_alloc(
|
|||
nvals * sizeof(struct berval), op->o_tmpmemctx );
|
||||
BER_BVZERO(&e->e_bv);
|
||||
e->e_private = e;
|
||||
e->e_attrs = (Attribute *)(e+1);
|
||||
e->e_attrs->a_vals = (struct berval *)(e->e_attrs+nattrs);
|
||||
if (nattrs) {
|
||||
e->e_attrs = (Attribute *)(e+1);
|
||||
e->e_attrs->a_vals = (struct berval *)(e->e_attrs+nattrs);
|
||||
} else {
|
||||
e->e_attrs = NULL;
|
||||
}
|
||||
|
||||
return e;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue