From 11d1cde2566bcae1e60da8ca942fd63702ddab97 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 29 Jan 2025 09:55:20 +0100 Subject: [PATCH] s4:dsdb/common: use talloc_zero() in samdb_result_dom_sid_attrs() This means struct auth_SidAttr can change without leaving uninitialized memory. Signed-off-by: Stefan Metzmacher Reviewed-by: Jennifer Sutton --- source4/dsdb/common/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 757133eb277..9e50982f97a 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -386,7 +386,7 @@ struct auth_SidAttr *samdb_result_dom_sid_attrs(TALLOC_CTX *mem_ctx, const struc if (v == NULL) { return NULL; } - sid = talloc(mem_ctx, struct auth_SidAttr); + sid = talloc_zero(mem_ctx, struct auth_SidAttr); if (sid == NULL) { return NULL; } -- 2.47.2