s4-ldb: fixed a uninitialised el->flags in ldb_tdb
authorAndrew Tridgell <tridge@samba.org>
Mon, 14 Feb 2011 02:08:44 +0000 (13:08 +1100)
committerAndrew Tridgell <tridge@samba.org>
Mon, 14 Feb 2011 06:55:09 +0000 (17:55 +1100)
this caused an intermittent failure in some tests

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/lib/ldb/ldb_tdb/ldb_tdb.c

index 831361c547377c368d56560f232036ba97df013c..2f7f22208607741e534380671cb428bac17eb289 100644 (file)
@@ -705,8 +705,7 @@ int ltdb_modify_internal(struct ldb_module *module,
                                        ret = LDB_ERR_OTHER;
                                        goto done;
                                }
-                               el->name = msg->elements[i].name;
-                               el->num_values = msg->elements[i].num_values;
+                               *el = msg->elements[i];
                                el->values = talloc_array(el, struct ldb_val, el->num_values);
                                if (el->values == NULL) {
                                        ret = LDB_ERR_OTHER;