svn commit: samba r3028 - in branches/SAMBA_4_0/source/lib: .

tridge at samba.org tridge at samba.org
Mon Oct 18 00:04:47 GMT 2004


Author: tridge
Date: 2004-10-18 00:04:46 +0000 (Mon, 18 Oct 2004)
New Revision: 3028

WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/branches/SAMBA_4_0/source/lib&rev=3028&nolog=1

Log:
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

Modified:
   branches/SAMBA_4_0/source/lib/events.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/events.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events.c	2004-10-17 23:59:56 UTC (rev 3027)
+++ branches/SAMBA_4_0/source/lib/events.c	2004-10-18 00:04:46 UTC (rev 3028)
@@ -297,7 +297,7 @@
 		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 @@
 			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 @@
 		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);



More information about the samba-cvs mailing list