diff options
-rw-r--r-- | source4/lib/ldb/common/ldb_msg.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 2 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_search.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index 8d921b989b..295c74c90d 100644 --- a/source4/lib/ldb/common/ldb_msg.c +++ b/source4/lib/ldb/common/ldb_msg.c @@ -443,7 +443,7 @@ struct ldb_message *ldb_msg_canonicalize(struct ldb_context *ldb, el2->values, sizeof(struct ldb_val) * el2->num_values); el1->num_values += el2->num_values; - talloc_free(el2->name); + talloc_free(discard_const_p(char, el2->name)); if (i+1<msg2->num_elements) { memmove(el2, el2+1, sizeof(struct ldb_message_element) * (msg2->num_elements - (i+1))); diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index b3d8fcc1a5..828bcc5d61 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -351,7 +351,7 @@ static LDAPMod **lldb_msg_to_mods(struct ldb_context *ldb, break; } } - mods[num_mods]->mod_type = el->name; + mods[num_mods]->mod_type = discard_const_p(char, el->name); mods[num_mods]->mod_vals.modv_bvals = talloc_array(mods[num_mods], struct berval *, 1+el->num_values); diff --git a/source4/lib/ldb/ldb_tdb/ldb_search.c b/source4/lib/ldb/ldb_tdb/ldb_search.c index d210510ff2..3644d046e0 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_search.c +++ b/source4/lib/ldb/ldb_tdb/ldb_search.c @@ -169,7 +169,7 @@ static struct ldb_message *ltdb_pull_attrs(struct ldb_module *module, talloc_free(ret); return NULL; } - talloc_free(el2.name); + talloc_free(discard_const_p(char, el2.name)); continue; } |