r8364: fixed a valgrind bug spotted by simo
authorAndrew Tridgell <tridge@samba.org>
Tue, 12 Jul 2005 09:02:58 +0000 (09:02 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:20:12 +0000 (13:20 -0500)
(This used to be commit ef804e8f36f1835d5d61f69565f1195a70f37e74)

source4/lib/ldb/common/ldb_attributes.c

index 3d4f24771f5a1f7e113eeb0416c321238b04db8c..a915666d78179623f0bc1e4eb05317c55a6e8178 100644 (file)
@@ -278,7 +278,7 @@ void ldb_subclass_remove(struct ldb_context *ldb, const char *class)
        talloc_free(c->name);
        talloc_free(c->subclasses);
        if (ldb->schema.num_classes-(i+1) > 0) {
-               memmove(c, c+1, sizeof(*c) * ldb->schema.num_classes-(i+1));
+               memmove(c, c+1, sizeof(*c) * (ldb->schema.num_classes-(i+1)));
        }
        ldb->schema.num_classes--;
        if (ldb->schema.num_classes == 0) {