summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-03-17 10:17:50 +0100
committerStefan Metzmacher <metze@samba.org>2009-03-17 19:59:08 +0100
commita78cd2a24b818bc7d843a8e56ffaafc9f6578662 (patch)
tree5d2058395c870537b47e84bb56c4a2e1ef151ad0 /lib
parent6c290586e41b3f5f7748a5b8c782be67cafe6c57 (diff)
downloadsamba-a78cd2a24b818bc7d843a8e56ffaafc9f6578662.tar.gz
samba-a78cd2a24b818bc7d843a8e56ffaafc9f6578662.tar.bz2
samba-a78cd2a24b818bc7d843a8e56ffaafc9f6578662.zip
tevent: use TALLOC_FREE() in tevent_req.c
metze
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent_req.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 3832088b34..3514f31514 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -265,14 +265,11 @@ bool tevent_req_is_in_progress(struct tevent_req *req)
*/
void tevent_req_received(struct tevent_req *req)
{
- talloc_free(req->data);
- req->data = NULL;
+ TALLOC_FREE(req->data);
req->private_print = NULL;
- talloc_free(req->internal.trigger);
- req->internal.trigger = NULL;
- talloc_free(req->internal.timer);
- req->internal.timer = NULL;
+ TALLOC_FREE(req->internal.trigger);
+ TALLOC_FREE(req->internal.timer);
req->internal.state = TEVENT_REQ_RECEIVED;
}
@@ -313,8 +310,7 @@ static void tevent_req_timedout(struct tevent_context *ev,
struct tevent_req *req = talloc_get_type(private_data,
struct tevent_req);
- talloc_free(req->internal.timer);
- req->internal.timer = NULL;
+ TALLOC_FREE(req->internal.timer);
tevent_req_finish(req, TEVENT_REQ_TIMED_OUT);
}
@@ -323,7 +319,7 @@ bool tevent_req_set_endtime(struct tevent_req *req,
struct tevent_context *ev,
struct timeval endtime)
{
- talloc_free(req->internal.timer);
+ TALLOC_FREE(req->internal.timer);
req->internal.timer = tevent_add_timer(ev, req, endtime,
tevent_req_timedout,