1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

lib: Use talloc_asprintf_addbuf() in ldb_module_call_chain()

This was exactly what talloc_asprintf_addbuf() does.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2022-11-28 11:07:25 +01:00 committed by Jeremy Allison
parent fe8895c83c
commit ffba59b5c0

View File

@ -1193,13 +1193,8 @@ char *ldb_module_call_chain(struct ldb_request *req, TALLOC_CTX *mem_ctx)
}
while (req && req->handle) {
char *s = talloc_asprintf_append_buffer(ret, "req[%u] %p : %s\n",
i++, req, ldb_req_location(req));
if (s == NULL) {
talloc_free(ret);
return NULL;
}
ret = s;
talloc_asprintf_addbuf(&ret, "req[%u] %p : %s\n",
i++, req, ldb_req_location(req));
req = req->handle->parent;
}
return ret;