diff options
author | Stefan Metzmacher <metze@samba.org> | 2006-11-15 17:34:20 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:15:50 -0500 |
commit | 866a3b6e40952193d5bcd812ec7079cf7434e600 (patch) | |
tree | fe66f644d76f735fb642ec80df4c368d573b4745 /source3/lib/ldb/modules/ldb_map_outbound.c | |
parent | 06715191dd4347104efb3f8929290edc1f969752 (diff) | |
download | samba-866a3b6e40952193d5bcd812ec7079cf7434e600.tar.gz samba-866a3b6e40952193d5bcd812ec7079cf7434e600.tar.bz2 samba-866a3b6e40952193d5bcd812ec7079cf7434e600.zip |
r19725: sync samba3's ldb with samba4
metze
(This used to be commit 207643e9c9c75546f38a09f12ea0b574b08086c5)
Diffstat (limited to 'source3/lib/ldb/modules/ldb_map_outbound.c')
-rw-r--r-- | source3/lib/ldb/modules/ldb_map_outbound.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/lib/ldb/modules/ldb_map_outbound.c b/source3/lib/ldb/modules/ldb_map_outbound.c index ff3b5c3aa2..dc213f36d1 100644 --- a/source3/lib/ldb/modules/ldb_map_outbound.c +++ b/source3/lib/ldb/modules/ldb_map_outbound.c @@ -195,6 +195,7 @@ static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_ele if (ldb_msg_add_empty(msg, el->name, 0, &old) != 0) { return -1; } + talloc_free(old->name); } /* copy new element */ @@ -234,7 +235,7 @@ static struct ldb_message_element *ldb_msg_el_map_remote(struct ldb_module *modu el->name = map_attr_map_remote(el, map, old->name); for (i = 0; i < el->num_values; i++) { - el->values[i] = ldb_val_map_remote(module, el->values, map, old->values[i]); + el->values[i] = ldb_val_map_remote(module, el->values, map, &old->values[i]); } return el; @@ -728,21 +729,21 @@ int map_subtree_collect_remote_simple(struct ldb_module *module, void *mem_ctx, *new = NULL; return 0; } - *(*new)->u.substring.chunks[i] = ldb_val_map_local(module, *new, map, *tree->u.substring.chunks[i]); + *(*new)->u.substring.chunks[i] = ldb_val_map_local(module, *new, map, tree->u.substring.chunks[i]); (*new)->u.substring.chunks[i+1] = NULL; } break; } case LDB_OP_EQUALITY: - (*new)->u.equality.value = ldb_val_map_local(module, *new, map, tree->u.equality.value); + (*new)->u.equality.value = ldb_val_map_local(module, *new, map, &tree->u.equality.value); break; case LDB_OP_LESS: case LDB_OP_GREATER: case LDB_OP_APPROX: - (*new)->u.comparison.value = ldb_val_map_local(module, *new, map, tree->u.comparison.value); + (*new)->u.comparison.value = ldb_val_map_local(module, *new, map, &tree->u.comparison.value); break; case LDB_OP_EXTENDED: - (*new)->u.extended.value = ldb_val_map_local(module, *new, map, tree->u.extended.value); + (*new)->u.extended.value = ldb_val_map_local(module, *new, map, &tree->u.extended.value); (*new)->u.extended.rule_id = talloc_strdup(*new, tree->u.extended.rule_id); break; default: /* unknown kind of simple subtree */ |