From 4e47d5dfa258f4de72163c393bb400d7c7207aa7 Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Wed, 10 Apr 2019 16:40:34 +1200 Subject: [PATCH] dsdb/replmd: use ldb_msg_remove_element() Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- source4/dsdb/samdb/ldb_modules/repl_meta_data.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c index d4ae1860fd1..e68a376a79e 100644 --- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -5491,8 +5491,7 @@ static int replmd_replicated_apply_add(struct replmd_replicated_request *ar) DEBUG(4,(__location__ ": Removing attribute %s with num_values==0\n", el->name)); - memmove(el, el+1, sizeof(*el)*(msg->num_elements - (i+1))); - msg->num_elements--; + ldb_msg_remove_element(msg, &msg->elements[i]); i--; continue; } -- 2.47.3