mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
s3:libads: RIP ads_destroy()
All ADS_STRUCT members are allocated under its talloc context. Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
8ea0dd1a38
commit
3d6ec74fd2
@ -144,21 +144,11 @@ char *ads_build_domain(const char *dn)
|
||||
return dnsdomain;
|
||||
}
|
||||
|
||||
/*
|
||||
free the memory used by the ADS structure initialized with 'ads_init(...)'
|
||||
*/
|
||||
static void ads_destroy(ADS_STRUCT **ads)
|
||||
{
|
||||
if (ads && *ads) {
|
||||
#ifdef HAVE_LDAP
|
||||
ads_disconnect(*ads);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
static int ads_destructor(ADS_STRUCT *ads)
|
||||
{
|
||||
ads_destroy(&ads);
|
||||
#ifdef HAVE_LDAP
|
||||
ads_disconnect(ads);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user