summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/dsdb/samdb/samdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 81b5afb2ee..8351ad5baf 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -680,11 +680,10 @@ int samdb_copy_template(struct ldb_context *ldb,
struct ldb_result *res;
struct ldb_message *t;
int ret, i, j;
-
- *errstring = NULL;
-
struct ldb_dn *basedn = ldb_dn_explode(ldb, "cn=Templates");
+ *errstring = NULL;
+
/* pull the template record */
ret = ldb_search(ldb, basedn, LDB_SCOPE_SUBTREE, filter, NULL, &res);
talloc_free(basedn);