summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-10 20:16:14 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:34 +1000
commit3e88f3cf339e49aedfaf949646df1e4b217435f4 (patch)
tree14b72492d804c96d4bbc26fb3c7e46baf0c94c55
parentd00cb8b3d311a694369e3a9a627ab7d6bc534c4b (diff)
downloadsamba-3e88f3cf339e49aedfaf949646df1e4b217435f4.tar.gz
samba-3e88f3cf339e49aedfaf949646df1e4b217435f4.tar.bz2
samba-3e88f3cf339e49aedfaf949646df1e4b217435f4.zip
s4-rootdse: setup length after NULL check
-rw-r--r--source4/dsdb/samdb/ldb_modules/rootdse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c
index 248a7203c8..2e7c97af38 100644
--- a/source4/dsdb/samdb/ldb_modules/rootdse.c
+++ b/source4/dsdb/samdb/ldb_modules/rootdse.c
@@ -146,12 +146,12 @@ static int expand_dn_in_message(struct ldb_module *module, struct ldb_message *m
dn2 = res->msgs[0]->dn;
v->data = (uint8_t *)ldb_dn_get_extended_linearized(msg->elements, dn2, edn_type);
- v->length = strlen((char *)v->data);
-
if (v->data == NULL) {
talloc_free(tmp_ctx);
return ldb_operr(ldb);
}
+ v->length = strlen((char *)v->data);
+
talloc_free(tmp_ctx);