From: Joseph Sutton Date: Tue, 10 Oct 2023 03:19:53 +0000 (+1300) Subject: s4:dsdb: Skip allocation of empty device SIDs array X-Git-Tag: tevent-0.16.0~80 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0ef3b4292d2985807f8a203901b3f623357e5db;p=thirdparty%2Fsamba.git s4:dsdb: Skip allocation of empty device SIDs array Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c index 81576829a75..42375a8437b 100644 --- a/source4/dsdb/samdb/samdb.c +++ b/source4/dsdb/samdb/samdb.c @@ -247,7 +247,7 @@ NTSTATUS security_token_create(TALLOC_CTX *mem_ctx, } } - if (authentication_was_compounded) { + if (authentication_was_compounded && num_device_sids) { ptoken->device_sids = talloc_array(ptoken, struct dom_sid, num_device_sids); if (ptoken->device_sids == NULL) { talloc_free(ptoken);