diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-03 10:59:18 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-11-03 11:30:00 +0100 |
commit | b067a5e4e83556d11a68ea1837ce4698762c123d (patch) | |
tree | 89eb5bcf6046db6f478e28846ddd74e22879e2d4 /source3/locking | |
parent | 558e2deda6798e06a6a64a25312b514566c38f66 (diff) | |
download | samba-b067a5e4e83556d11a68ea1837ce4698762c123d.tar.gz samba-b067a5e4e83556d11a68ea1837ce4698762c123d.tar.bz2 samba-b067a5e4e83556d11a68ea1837ce4698762c123d.zip |
s3: Remove debug_ctx()
smbd just crashed on me: In a debug message I called a routine preparing a
string that itself used debug_ctx. The outer routine also used it after the
inner routine had returned. It was still referencing the talloc context
that the outer debug_ctx() had given us, which the inner DEBUG had already
freed.
Diffstat (limited to 'source3/locking')
-rw-r--r-- | source3/locking/brlock.c | 2 | ||||
-rw-r--r-- | source3/locking/locking.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c index 18a798182b..c72fad7f2e 100644 --- a/source3/locking/brlock.c +++ b/source3/locking/brlock.c @@ -45,7 +45,7 @@ static void print_lock_struct(unsigned int i, struct lock_struct *pls) i, (unsigned int)pls->context.smbpid, (unsigned int)pls->context.tid, - procid_str(debug_ctx(), &pls->context.pid) )); + procid_str(talloc_tos(), &pls->context.pid) )); DEBUG(10,("start = %.0f, size = %.0f, fnum = %d, %s %s\n", (double)pls->start, diff --git a/source3/locking/locking.c b/source3/locking/locking.c index 5b17e3b6e8..cf787d4fac 100644 --- a/source3/locking/locking.c +++ b/source3/locking/locking.c @@ -545,9 +545,9 @@ static bool parse_share_modes(const TDB_DATA dbuf, struct share_mode_lock *lck) DEBUG(10, ("parse_share_modes: delete_on_close: %d, owrt: %s, " "cwrt: %s, tok: %u, num_share_modes: %d\n", lck->delete_on_close, - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t(lck->old_write_time)), - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t( lck->changed_write_time)), (unsigned int)data.u.s.delete_token_size, @@ -719,9 +719,9 @@ static TDB_DATA unparse_share_modes(const struct share_mode_lock *lck) DEBUG(10,("unparse_share_modes: del: %d, owrt: %s cwrt: %s, tok: %u, " "num: %d\n", data->u.s.delete_on_close, - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t(lck->old_write_time)), - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t( lck->changed_write_time)), (unsigned int)data->u.s.delete_token_size, @@ -1476,7 +1476,7 @@ bool set_sticky_write_time(struct file_id fileid, struct timespec write_time) struct share_mode_lock *lck; DEBUG(5,("set_sticky_write_time: %s id=%s\n", - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t(write_time)), file_id_string_tos(&fileid))); @@ -1499,7 +1499,7 @@ bool set_write_time(struct file_id fileid, struct timespec write_time) struct share_mode_lock *lck; DEBUG(5,("set_write_time: %s id=%s\n", - timestring(debug_ctx(), + timestring(talloc_tos(), convert_timespec_to_time_t(write_time)), file_id_string_tos(&fileid))); |