diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2012-05-04 08:46:29 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-22 01:31:55 +0200 |
commit | 166a7d37f7bfc7b22163e1d38a0bb0e47c2f6622 (patch) | |
tree | ee5978f5df7f92c8d3e7f75c5fdd5c0b67ef53d6 /source4/dsdb/schema | |
parent | db075b0202a4046f6329b52dccbff906c401005a (diff) | |
download | samba-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>
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r-- | source4/dsdb/schema/schema_query.c | 7 |
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); } |