From 9733d711994fc7955a041b34a7b7a39f303d5cf3 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 1 Dec 2010 16:19:17 +0100 Subject: ldb:ldb_msg_add_value - fix here a wrong memory context A value array allocation should belong to "msg->elements" not "msg" directly --- source4/lib/ldb/common/ldb_msg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4') 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; -- cgit