]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-dsdb: Check for talloc failure in dsdb_expand_nested_groups()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Mon, 7 Nov 2022 01:32:23 +0000 (14:32 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 8 Feb 2023 00:03:39 +0000 (00:03 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/common/util_groups.c

index 97dc50c5ecf48abefcb761aae4a646621c18c5fc..120015877a371cfa672d50879abf83fa28fa7fb2 100644 (file)
@@ -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) {