From 8731e0c6cd267dbf23e9834d0022713d3a17d791 Mon Sep 17 00:00:00 2001 From: Garming Sam Date: Thu, 17 Dec 2015 11:41:13 +1300 Subject: [PATCH] lib/ldb: Rename variable for clarity The variable p is the same as attr at this point since p is only incremented when a continue is invoked in the loop. Signed-off-by: Garming Sam Reviewed-by: Andrew Bartlett --- lib/ldb/common/ldb_pack.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ldb/common/ldb_pack.c b/lib/ldb/common/ldb_pack.c index a0bb757a941..49d226ce066 100644 --- a/lib/ldb/common/ldb_pack.c +++ b/lib/ldb/common/ldb_pack.c @@ -373,7 +373,8 @@ int ldb_unpack_data_only_attr_list(struct ldb_context *ldb, } } element = &message->elements[nelem]; - element->name = talloc_strndup(message->elements, (char *)p, attr_len); + element->name = talloc_strndup(message->elements, attr, attr_len); + if (element->name == NULL) { errno = ENOMEM; goto failed; -- 2.11.4.GIT