LDAP *ld,
const char *server_name)
{
+ TALLOC_CTX *frame = talloc_stackframe();
Sockbuf_IO *io = discard_const_p(Sockbuf_IO, &ads_tlswrap_sockbuf_io);
Sockbuf *sb = NULL;
struct loadparm_context *lp_ctx = NULL;
rc = ldap_get_option(ld, LDAP_OPT_SOCKBUF, &sb);
status = ADS_ERROR_LDAP(rc);
if (!ADS_ERR_OK(status)) {
+ TALLOC_FREE(frame);
return status;
}
- lp_ctx = loadparm_init_s3(talloc_tos(), loadparm_s3_helpers());
+ lp_ctx = loadparm_init_s3(frame, loadparm_s3_helpers());
if (lp_ctx == NULL) {
+ TALLOC_FREE(frame);
return ADS_ERROR(LDAP_NO_MEMORY);
}
server_name,
&wrap->tls_params);
if (!NT_STATUS_IS_OK(ntstatus)) {
+ TALLOC_FREE(frame);
return ADS_ERROR_NT(ntstatus);
}
rc = ber_sockbuf_add_io(sb, io, LBER_SBIOD_LEVEL_TRANSPORT, wrap);
status = ADS_ERROR_LDAP(rc);
if (!ADS_ERR_OK(status)) {
+ TALLOC_FREE(frame);
return status;
}
wrap->endtime = timeval_zero();
if (!NT_STATUS_IS_OK(ntstatus)) {
ber_sockbuf_remove_io(sb, io, LBER_SBIOD_LEVEL_TRANSPORT);
+ TALLOC_FREE(frame);
return ADS_ERROR_NT(ntstatus);
}
+ TALLOC_FREE(frame);
return ADS_SUCCESS;
}