]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:net: Pass a talloc context to ads_startup_int()
authorSamuel Cabrero <scabrero@samba.org>
Thu, 26 May 2022 12:43:25 +0000 (14:43 +0200)
committerJeremy Allison <jra@samba.org>
Mon, 27 Jun 2022 15:50:30 +0000 (15:50 +0000)
The ads struct will be allocated under this context.

Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/net_ads.c

index e2c0bfc35b046ced484a6ccf23ad5a74858d69ef..e82b8e8422bc7f248c5950963472944e72185b9d 100644 (file)
@@ -603,8 +603,11 @@ out:
        return ret;
 }
 
-static ADS_STATUS ads_startup_int(struct net_context *c, bool only_own_domain,
-                                 uint32_t auth_flags, ADS_STRUCT **ads_ret)
+static ADS_STATUS ads_startup_int(struct net_context *c,
+                                 bool only_own_domain,
+                                 uint32_t auth_flags,
+                                 TALLOC_CTX *mem_ctx,
+                                 ADS_STRUCT **ads_ret)
 {
        ADS_STRUCT *ads = NULL;
        ADS_STATUS status;
@@ -745,7 +748,7 @@ ADS_STATUS ads_startup(struct net_context *c,
                       TALLOC_CTX *mem_ctx,
                       ADS_STRUCT **ads)
 {
-       return ads_startup_int(c, only_own_domain, 0, ads);
+       return ads_startup_int(c, only_own_domain, 0, mem_ctx, ads);
 }
 
 ADS_STATUS ads_startup_nobind(struct net_context *c,
@@ -753,7 +756,11 @@ ADS_STATUS ads_startup_nobind(struct net_context *c,
                              TALLOC_CTX *mem_ctx,
                              ADS_STRUCT **ads)
 {
-       return ads_startup_int(c, only_own_domain, ADS_AUTH_NO_BIND, ads);
+       return ads_startup_int(c,
+                              only_own_domain,
+                              ADS_AUTH_NO_BIND,
+                              mem_ctx,
+                              ads);
 }
 
 /*