summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-05-04 08:46:29 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-08-22 01:31:55 +0200
commit166a7d37f7bfc7b22163e1d38a0bb0e47c2f6622 (patch)
treeee5978f5df7f92c8d3e7f75c5fdd5c0b67ef53d6
parentdb075b0202a4046f6329b52dccbff906c401005a (diff)
downloadsamba-166a7d37f7bfc7b22163e1d38a0bb0e47c2f6622.tar.gz
samba-166a7d37f7bfc7b22163e1d38a0bb0e47c2f6622.tar.bz2
samba-166a7d37f7bfc7b22163e1d38a0bb0e47c2f6622.zip
s4:dsdb_sort_objectClass_attr - use "data_blob_string_const" for setting values
As shown in commit c8e6d8b487 this looks easier and in any case we can treat schema context data like global data. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r--source4/dsdb/schema/schema_query.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index d16711ad19..ce46fa6315 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -595,12 +595,7 @@ int dsdb_sort_objectClass_attr(struct ldb_context *ldb,
if (el->values == NULL) {
return ldb_oom(ldb);
}
- el->values[el->num_values].data = (uint8_t *)talloc_strdup(out_mem_ctx,
- current->objectclass->lDAPDisplayName);
- if (el->values[el->num_values].data == NULL) {
- return ldb_oom(ldb);
- }
- el->values[el->num_values].length = strlen(current->objectclass->lDAPDisplayName);
+ el->values[el->num_values] = data_blob_string_const(current->objectclass->lDAPDisplayName);
++(el->num_values);
}