summaryrefslogtreecommitdiff
path: root/source3/lib/ldb/modules/ldb_map_outbound.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/ldb/modules/ldb_map_outbound.c')
-rw-r--r--source3/lib/ldb/modules/ldb_map_outbound.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/lib/ldb/modules/ldb_map_outbound.c b/source3/lib/ldb/modules/ldb_map_outbound.c
index cd33f29043..ff3b5c3aa2 100644
--- a/source3/lib/ldb/modules/ldb_map_outbound.c
+++ b/source3/lib/ldb/modules/ldb_map_outbound.c
@@ -192,12 +192,7 @@ static int ldb_msg_replace(struct ldb_message *msg, const struct ldb_message_ele
/* no local result, add as new element */
if (old == NULL) {
- if (ldb_msg_add_empty(msg, el->name, 0) != 0) {
- return -1;
- }
-
- old = ldb_msg_find_element(msg, el->name);
- if (old == NULL) {
+ if (ldb_msg_add_empty(msg, el->name, 0, &old) != 0) {
return -1;
}
}