diff options
author | Volker Lendecke <vl@samba.org> | 2009-11-03 10:59:18 +0100 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-11-26 11:40:03 +0100 |
commit | 2176e0a8453cd53894e1f27dfbc86beeaf06cdd9 (patch) | |
tree | fd69b8c5d1e94a88f939227065737631f6ea3100 /source3/smbd/oplock_onefs.c | |
parent | 2b9233a026f9e4f80d0b4d71a95068e0a5405c68 (diff) | |
download | samba-2176e0a8453cd53894e1f27dfbc86beeaf06cdd9.tar.gz samba-2176e0a8453cd53894e1f27dfbc86beeaf06cdd9.tar.xz samba-2176e0a8453cd53894e1f27dfbc86beeaf06cdd9.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.
(cherry picked from commit 172542036aa1047cc7ee95c8e0a33dead6b3076f)
Diffstat (limited to 'source3/smbd/oplock_onefs.c')
-rw-r--r-- | source3/smbd/oplock_onefs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source3/smbd/oplock_onefs.c b/source3/smbd/oplock_onefs.c index 4a9efe69296..c80925ced31 100644 --- a/source3/smbd/oplock_onefs.c +++ b/source3/smbd/oplock_onefs.c @@ -67,22 +67,22 @@ const char *onefs_cb_record_str_dbg(const struct onefs_callback_record *r) char *result; if (r == NULL) { - result = talloc_strdup(debug_ctx(), "NULL callback record"); + result = talloc_strdup(talloc_tos(), "NULL callback record"); return result; } switch (r->state) { case ONEFS_OPEN_FILE: - result = talloc_asprintf(debug_ctx(), "cb record %llu for " + result = talloc_asprintf(talloc_tos(), "cb record %llu for " "file %s", r->id, fsp_str_dbg(r->data.fsp)); case ONEFS_WAITING_FOR_OPLOCK: - result = talloc_asprintf(debug_ctx(), "cb record %llu for " + result = talloc_asprintf(talloc_tos(), "cb record %llu for " "pending mid %d", r->id, (int)r->data.mid); break; default: - result = talloc_asprintf(debug_ctx(), "cb record %llu unknown " + result = talloc_asprintf(talloc_tos(), "cb record %llu unknown " "state %d", r->id, r->state); break; } |