summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-08 11:43:40 +0100
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2010-03-08 11:45:39 +0100
commit30ff229a3e32549073424b423302e976c988d563 (patch)
tree00491ad4dcf5e9c81f2e8e7338784a852922e5a0 /source4/lib/ldb
parentf8dba773a5174055e3c206d006317b5275481636 (diff)
downloadsamba-30ff229a3e32549073424b423302e976c988d563.tar.gz
s4:LDB TDB index code - reintroduce accidentally removed code part
This was removed by 95d726f3018ef5d249f89d56bde24b7ee0c24ecf. Sorry.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_index.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c
index c9c3e0c2118..828dca1f2cb 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_index.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_index.c
@@ -1331,7 +1331,9 @@ int ltdb_index_del_value(struct ldb_module *module, struct ldb_dn *dn,
}
j = (unsigned int) i;
- memmove(&list->dn[j], &list->dn[j+1], sizeof(list->dn[0])*(list->count - (i+1)));
+ if (j != list->count - 1) {
+ memmove(&list->dn[j], &list->dn[j+1], sizeof(list->dn[0])*(list->count - (j+1)));
+ }
list->count--;
list->dn = talloc_realloc(list, list->dn, struct ldb_val, list->count);