summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2012-08-13 15:31:16 +0200
committerStefan Metzmacher <metze@samba.org>2012-08-14 10:40:55 +0200
commitd81d6afd6f0d661b836885f57ab397c1e905a90b (patch)
treeae8a17a932085170c036f14d4493e8327054ef5e /source4
parent956678685325a79a315f4ef19c0d834fd1747e4c (diff)
downloadsamba-d81d6afd6f0d661b836885f57ab397c1e905a90b.tar.gz
samba-d81d6afd6f0d661b836885f57ab397c1e905a90b.tar.bz2
samba-d81d6afd6f0d661b836885f57ab397c1e905a90b.zip
s4:dsdb/repl: avoid reallocation of msg->elements
The index into the elements needs to match between msg->elements and md->ctr.ctr1.array, which means we should pre-allocate them with the same size. Pair-Programmed-With: Björn Baumbach <bb@sernet.de> metze
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/repl/replicated_objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c
index 564befe2c1..cd664e3656 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -258,7 +258,7 @@ WERROR dsdb_convert_object_ex(struct ldb_context *ldb,
msg->num_elements = in->object.attribute_ctr.num_attributes;
msg->elements = talloc_array(msg, struct ldb_message_element,
- msg->num_elements);
+ msg->num_elements + 1); /* +1 because of the RDN attribute */
W_ERROR_HAVE_NO_MEMORY(msg->elements);
md = talloc(mem_ctx, struct replPropertyMetaDataBlob);