]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
winbindd: assert that wbint_binding_handle() gets a valid memory context
authorStefan Metzmacher <metze@samba.org>
Fri, 7 Feb 2025 15:10:59 +0000 (16:10 +0100)
committerRalph Boehme <slow@samba.org>
Sat, 8 Feb 2025 15:26:38 +0000 (15:26 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/winbindd/winbindd_dual_ndr.c

index 219596b9fc03e31ae359a070f64f1ae905899ebb..2d45238557263096f337baf86d0edba240369c25 100644 (file)
@@ -38,7 +38,7 @@
 #include "lib/tsocket/tsocket.h"
 
 struct wbint_bh_state {
-       struct winbindd_domain *domain;
+       struct winbindd_domain *domain; /* if valid also talloc (grant) parent */
        struct winbindd_child *child;
        const struct dcerpc_binding *binding;
 };
@@ -518,6 +518,8 @@ struct dcerpc_binding_handle *wbint_binding_handle(TALLOC_CTX *mem_ctx,
        struct dcerpc_binding *b = NULL;
        NTSTATUS status;
 
+       SMB_ASSERT(mem_ctx != NULL);
+
        SMB_ASSERT((domain != NULL && child == NULL) ||
                  (domain == NULL && child != NULL));