static void
SMBC_module_terminate(void)
{
+ TALLOC_CTX *frame = talloc_stackframe();
secrets_shutdown();
gfree_all();
SMBC_initialized = false;
+ TALLOC_FREE(frame);
}
smbc_new_context(void)
{
SMBCCTX *context;
+ TALLOC_CTX *frame = talloc_stackframe();
/* The first call to this function should initialize the module */
SMB_THREAD_ONCE(&SMBC_initialized, SMBC_module_init, NULL);
*/
context = SMB_MALLOC_P(SMBCCTX);
if (!context) {
+ TALLOC_FREE(frame);
errno = ENOMEM;
return NULL;
}
context->internal = SMB_MALLOC_P(struct SMBC_internal_data);
if (!context->internal) {
+ TALLOC_FREE(frame);
SAFE_FREE(context);
errno = ENOMEM;
return NULL;
smbc_setFunctionListPrintJobs(context, SMBC_list_print_jobs_ctx);
smbc_setFunctionUnlinkPrintJob(context, SMBC_unlink_print_job_ctx);
+ TALLOC_FREE(frame);
return context;
}
smbc_free_context(SMBCCTX *context,
int shutdown_ctx)
{
+ TALLOC_CTX *frame;
if (!context) {
errno = EBADF;
return 1;
}
+ frame = talloc_stackframe();
+
if (shutdown_ctx) {
SMBCFILE * f;
DEBUG(1,("Performing aggressive shutdown.\n"));
DEBUG(1, ("Could not purge all servers, "
"free_context failed.\n"));
errno = EBUSY;
+ TALLOC_FREE(frame);
return 1;
}
if (context->internal->servers) {
DEBUG(1, ("Active servers in context, "
"free_context failed.\n"));
errno = EBUSY;
+ TALLOC_FREE(frame);
return 1;
}
if (context->internal->files) {
DEBUG(1, ("Active files in context, "
"free_context failed.\n"));
errno = EBUSY;
+ TALLOC_FREE(frame);
return 1;
}
}
smb_panic("error unlocking 'initialized_ctx_count'");
}
+ TALLOC_FREE(frame);
return 0;
}
const char *s;
} option_value;
+ TALLOC_CTX *frame = talloc_stackframe();
+
va_start(ap, option_name);
if (strcmp(option_name, "debug_to_stderr") == 0) {
}
va_end(ap);
+ TALLOC_FREE(frame);
}