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/smbd/oplock.c | |
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/smbd/oplock.c')
-rw-r--r-- | source3/smbd/oplock.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index dd8d5372fb..cdb6093fe9 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -433,7 +433,7 @@ void process_oplock_async_level2_break_message(struct messaging_context *msg_ctx message_to_share_mode_entry(&msg, (char *)data->data); DEBUG(10, ("Got oplock async level 2 break message from pid %s: " - "%s/%lu\n", procid_str(debug_ctx(), &src), + "%s/%lu\n", procid_str(talloc_tos(), &src), file_id_string_tos(&msg.id), msg.share_file_id)); fsp = initial_break_processing(msg.id, msg.share_file_id); @@ -478,7 +478,7 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx, message_to_share_mode_entry(&msg, (char *)data->data); DEBUG(10, ("Got oplock break message from pid %s: %s/%lu\n", - procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), + procid_str(talloc_tos(), &src), file_id_string_tos(&msg.id), msg.share_file_id)); fsp = initial_break_processing(msg.id, msg.share_file_id); @@ -586,7 +586,7 @@ static void process_kernel_oplock_break(struct messaging_context *msg_ctx, file_id = (unsigned long)IVAL(data->data, 24); DEBUG(10, ("Got kernel oplock break message from pid %s: %s/%u\n", - procid_str(debug_ctx(), &src), file_id_string_tos(&id), + procid_str(talloc_tos(), &src), file_id_string_tos(&id), (unsigned int)file_id)); fsp = initial_break_processing(id, file_id); @@ -682,7 +682,7 @@ static void process_oplock_break_response(struct messaging_context *msg_ctx, message_to_share_mode_entry(&msg, (char *)data->data); DEBUG(10, ("Got oplock break response from pid %s: %s/%lu mid %u\n", - procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), + procid_str(talloc_tos(), &src), file_id_string_tos(&msg.id), msg.share_file_id, (unsigned int)msg.op_mid)); /* Here's the hack from open.c, store the mid in the 'port' field */ @@ -711,7 +711,7 @@ static void process_open_retry_message(struct messaging_context *msg_ctx, message_to_share_mode_entry(&msg, (char *)data->data); DEBUG(10, ("Got open retry msg from pid %s: %s mid %u\n", - procid_str(debug_ctx(), &src), file_id_string_tos(&msg.id), + procid_str(talloc_tos(), &src), file_id_string_tos(&msg.id), (unsigned int)msg.op_mid)); schedule_deferred_open_smb_message(msg.op_mid); |