diff options
author | Jeremy Allison <jra@samba.org> | 2010-04-26 10:54:33 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2010-04-26 10:54:33 -0700 |
commit | 6beba782f1bf951236813e0b46115b8102212c03 (patch) | |
tree | a6a02ab240977d72e5c3b30b27b12f086eaaec1d /source3 | |
parent | abdb96b8ff373b78ffbf24c66c4e6b69886e87c4 (diff) | |
download | samba-6beba782f1bf951236813e0b46115b8102212c03.tar.gz samba-6beba782f1bf951236813e0b46115b8102212c03.tar.bz2 samba-6beba782f1bf951236813e0b46115b8102212c03.zip |
Fix crash when rescheduling oplock open.
Jeremy.
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/smb2_create.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 6a118c3947..3302730fbe 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -981,6 +981,15 @@ void schedule_deferred_open_message_smb2(uint64_t mid) /* Ensure we don't have any outstanding timer event. */ TALLOC_FREE(state->te); + /* + * This is subtle. We must null out the callback + * before resheduling, else the first call to + * tevent_req_nterror() causes the _receive() + * function to be called, this causing tevent_req_post() + * to crash. + */ + tevent_req_set_callback(smb2req->subreq, NULL, NULL); + im = tevent_create_immediate(smb2req); if (!im) { smbd_server_connection_terminate(smb2req->sconn, |