git.samba.org
/
metze
/
samba-autobuild-v4-18-test
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2093639
)
s3:libads: Allocate temporary memory context for ads_domain_func_level()
author
Samuel Cabrero
<scabrero@samba.org>
Tue, 24 May 2022 16:05:38 +0000
(18:05 +0200)
committer
Jeremy Allison
<jra@samba.org>
Mon, 27 Jun 2022 15:50:29 +0000
(15:50 +0000)
Prepare to allocate ADS_STRUCT under talloc context.
Signed-off-by: Samuel Cabrero <scabrero@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libads/ldap.c
patch
|
blob
|
history
diff --git
a/source3/libads/ldap.c
b/source3/libads/ldap.c
index c9aa42faedf71bf69ac335cee85002203328ebc4..23a2dacfb4c28aae654a2caf357d934de027dc4a 100755
(executable)
--- a/
source3/libads/ldap.c
+++ b/
source3/libads/ldap.c
@@
-3354,6
+3354,7
@@
done:
ADS_STATUS ads_domain_func_level(ADS_STRUCT *ads, uint32_t *val)
{
+ TALLOC_CTX *tmp_ctx = talloc_stackframe();
const char *attrs[] = {"domainFunctionality", NULL};
ADS_STATUS status;
LDAPMessage *res;
@@
-3424,6
+3425,7
@@
done:
if ( ads_s != ads ) {
ads_destroy( &ads_s );
}
+ TALLOC_FREE(tmp_ctx);
return status;
}