summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-01 16:19:17 +0100
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-12-01 16:30:08 +0100
commit9733d711994fc7955a041b34a7b7a39f303d5cf3 (patch)
treea32c3f51ce216f64cf3133094a364dc7fabab1d8 /source4/lib/ldb
parent0cf456960599d4a7b7af3cdc9d070d018572f77b (diff)
downloadsamba-9733d711994fc7955a041b34a7b7a39f303d5cf3.tar.gz
samba-9733d711994fc7955a041b34a7b7a39f303d5cf3.tar.bz2
samba-9733d711994fc7955a041b34a7b7a39f303d5cf3.zip
ldb:ldb_msg_add_value - fix here a wrong memory context
A value array allocation should belong to "msg->elements" not "msg" directly
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/common/ldb_msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c
index dfd86c6d3a..8b51ad087c 100644
--- a/source4/lib/ldb/common/ldb_msg.c
+++ b/source4/lib/ldb/common/ldb_msg.c
@@ -226,7 +226,8 @@ int ldb_msg_add_value(struct ldb_message *msg,
}
}
- vals = talloc_realloc(msg, el->values, struct ldb_val, el->num_values+1);
+ vals = talloc_realloc(msg->elements, el->values, struct ldb_val,
+ el->num_values+1);
if (!vals) {
errno = ENOMEM;
return LDB_ERR_OPERATIONS_ERROR;