From: Joseph Sutton Date: Mon, 7 Nov 2022 01:32:23 +0000 (+1300) Subject: s4-dsdb: Check for talloc failure in dsdb_expand_nested_groups() X-Git-Tag: talloc-2.4.1~1674 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dab2ecddf6b9ebc10d1ed3cfcb5f8f4f2236f1c;p=thirdparty%2Fsamba.git s4-dsdb: Check for talloc failure in dsdb_expand_nested_groups() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/common/util_groups.c b/source4/dsdb/common/util_groups.c index 97dc50c5ecf..120015877a3 100644 --- a/source4/dsdb/common/util_groups.c +++ b/source4/dsdb/common/util_groups.c @@ -86,6 +86,9 @@ NTSTATUS dsdb_expand_nested_groups(struct ldb_context *sam_ctx, } tmp_ctx = talloc_new(res_sids_ctx); + if (tmp_ctx == NULL) { + return NT_STATUS_NO_MEMORY; + } dn = ldb_dn_from_ldb_val(tmp_ctx, sam_ctx, dn_val); if (dn == NULL) {