summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-18 00:04:46 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:59 -0500
commitd37acd0fe71923987a68377bf01040eaed245d9f (patch)
tree2961246ea20752475309c31b112f7b26854dd514 /source4/lib
parent260b012f226d0e65ca0f74049f0984b9d8cc6250 (diff)
downloadsamba-d37acd0fe71923987a68377bf01040eaed245d9f.tar.gz
samba-d37acd0fe71923987a68377bf01040eaed245d9f.tar.bz2
samba-d37acd0fe71923987a68377bf01040eaed245d9f.zip
r3028: use talloc_free() instead of talloc_unlink(), as the
event_context_merge() code leaves the events as grandchildren of the events context, not children, so talloc_unlink() will not work after the merge (This used to be commit 2d0dfe607dcfb522669d6fb3d566cf121d84274a)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/lib/events.c b/source4/lib/events.c
index 2cedfc083c..dac23ec6bc 100644
--- a/source4/lib/events.c
+++ b/source4/lib/events.c
@@ -297,7 +297,7 @@ int event_loop_once(struct event_context *ev)
struct loop_event *next = le->next;
if (le->ref_count == 0) {
DLIST_REMOVE(ev->loop_events, le);
- talloc_unlink(ev->events, le);
+ talloc_free(le);
} else {
le->ref_count++;
le->handler(ev, le, t);
@@ -318,7 +318,7 @@ int event_loop_once(struct event_context *ev)
if (ev->maxfd == fe->fd) {
ev->maxfd = EVENT_INVALID_MAXFD;
}
- talloc_unlink(ev->events, fe);
+ talloc_free(fe);
} else {
if (fe->flags & EVENT_FD_READ) {
FD_SET(fe->fd, &r_fds);
@@ -399,7 +399,7 @@ int event_loop_once(struct event_context *ev)
struct timed_event *next = te->next;
if (te->ref_count == 0) {
DLIST_REMOVE(ev->timed_events, te);
- talloc_unlink(ev->events, te);
+ talloc_free(te);
} else if (te->next_event <= t) {
te->ref_count++;
te->handler(ev, te, t);