From 9733d711994fc7955a041b34a7b7a39f303d5cf3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Wed, 1 Dec 2010 16:19:17 +0100 Subject: [PATCH] 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(-) diff --git a/source4/lib/ldb/common/ldb_msg.c b/source4/lib/ldb/common/ldb_msg.c index dfd86c6d3a89..8b51ad087cb5 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; -- 2.34.1