]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:dsdb/common: use talloc_zero() in samdb_result_dom_sid_attrs()
authorStefan Metzmacher <metze@samba.org>
Wed, 29 Jan 2025 08:55:20 +0000 (09:55 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 14 Feb 2025 14:21:33 +0000 (14:21 +0000)
This means struct auth_SidAttr can change without leaving
uninitialized memory.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jennifer Sutton <jennifersutton@catalyst.net.nz>
source4/dsdb/common/util.c

index 757133eb277a211b22dd59701df1554d851d06e4..9e50982f97a8caf04c82e3da1be5f15d4fb44bb7 100644 (file)
@@ -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;
        }