From: Douglas Bagnall Date: Wed, 10 Apr 2019 04:40:34 +0000 (+1200) Subject: dsdb/replmd: use ldb_msg_remove_element() X-Git-Tag: tdb-1.4.1~99 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e47d5dfa258f4de72163c393bb400d7c7207aa7;p=thirdparty%2Fsamba.git dsdb/replmd: use ldb_msg_remove_element() Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- 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; }