summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/debug.c19
-rw-r--r--source3/lib/util_sid.c2
2 files changed, 3 insertions, 18 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 2e19f89863..e851fd20e9 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -90,8 +90,6 @@ bool AllowDebugChange = True;
*/
bool override_logfile;
-static TALLOC_CTX *tmp_debug_ctx;
-
/*
* This is to allow assignment to DEBUGLEVEL before the debug
* system has been initialized.
@@ -888,8 +886,6 @@ void check_log_size( void )
}
done:
- TALLOC_FREE(tmp_debug_ctx);
-
errno = old_errno;
return( 0 );
@@ -1057,12 +1053,12 @@ bool dbghdrclass(int level, int cls, const char *location, const char *func)
/* Print it all out at once to prevent split syslog output. */
if( lp_debug_prefix_timestamp() ) {
(void)Debug1( "[%s, %2d%s] ",
- current_timestring(debug_ctx(),
+ current_timestring(talloc_tos(),
lp_debug_hires_timestamp()),
level, header_str);
} else {
(void)Debug1( "[%s, %2d%s] %s(%s)\n",
- current_timestring(debug_ctx(),
+ current_timestring(talloc_tos(),
lp_debug_hires_timestamp()),
level, header_str, location, func );
}
@@ -1110,14 +1106,3 @@ bool dbghdr(int level, const char *location, const char *func)
SAFE_FREE(msgbuf);
return ret;
}
-
-/*
- * Get us a temporary talloc context usable just for DEBUG arguments
- */
-TALLOC_CTX *debug_ctx(void)
-{
- if (tmp_debug_ctx == NULL) {
- tmp_debug_ctx = talloc_named_const(NULL, 0, "debug_ctx");
- }
- return tmp_debug_ctx;
-}
diff --git a/source3/lib/util_sid.c b/source3/lib/util_sid.c
index 9e5d4d38a5..639269cac2 100644
--- a/source3/lib/util_sid.c
+++ b/source3/lib/util_sid.c
@@ -201,7 +201,7 @@ char *sid_string_talloc(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
char *sid_string_dbg(const DOM_SID *sid)
{
- return sid_string_talloc(debug_ctx(), sid);
+ return sid_string_talloc(talloc_tos(), sid);
}
/*****************************************************************