From 53269f237bf8a61b0e897ce29b424b84c2037665 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 30 Jan 2014 16:12:44 +0100 Subject: [PATCH] HACK smb2_notify --- source3/smbd/smb2_notify.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/smbd/smb2_notify.c b/source3/smbd/smb2_notify.c index 81aa615..7ea0372 100644 --- a/source3/smbd/smb2_notify.c +++ b/source3/smbd/smb2_notify.c @@ -160,6 +160,13 @@ static void smbd_smb2_notify_reply(struct smb_request *smbreq, uint8_t *buf, size_t len); static bool smbd_smb2_notify_cancel(struct tevent_req *req); +static int smbd_smb2_notify_smbreq_destructor(struct smb_request *smbreq) +{ + talloc_steal(smbreq->smb2req, smbreq); + talloc_set_destructor(smbreq, NULL); + return -1; +} + static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct smbd_smb2_request *smb2req, @@ -266,6 +273,8 @@ static struct tevent_req *smbd_smb2_notify_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } + talloc_set_destructor(smbreq, smbd_smb2_notify_smbreq_destructor); + /* allow this request to be canceled */ tevent_req_set_cancel_fn(req, smbd_smb2_notify_cancel); -- 1.8.1.2