tevent: let tevent_req_received() clear the private_cancel function
authorStefan Metzmacher <metze@samba.org>
Fri, 27 Sep 2013 00:59:22 +0000 (02:59 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 11 Dec 2013 21:46:09 +0000 (22:46 +0100)
This makes sure it's not called when the private state is already gone.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
lib/tevent/tevent_req.c

index 4a3b8b1c7b7fe40d753a61d0ecd1f0d32b50f783..a324418b195076cc42784b6ca4c04af3aa860d3b 100644 (file)
@@ -203,6 +203,7 @@ void tevent_req_received(struct tevent_req *req)
 {
        TALLOC_FREE(req->data);
        req->private_print = NULL;
+       req->private_cancel = NULL;
 
        TALLOC_FREE(req->internal.trigger);
        TALLOC_FREE(req->internal.timer);