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

metze at samba.org metze at samba.org
Fri Jan 14 01:21:58 GMT 2005


Author: metze
Date: 2005-01-14 01:21:56 +0000 (Fri, 14 Jan 2005)
New Revision: 4727

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4727

Log:
add a reference to the event context
to that the destructor don't double free the registered events
when the event context is first in the talloc_free() hierarchie

fixes a bug with process_model_thread and the talloc_steal(conn, ev)

metze

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


Changeset:
Modified: branches/SAMBA_4_0/source/lib/messaging/messaging.c
===================================================================
--- branches/SAMBA_4_0/source/lib/messaging/messaging.c	2005-01-13 18:49:10 UTC (rev 4726)
+++ branches/SAMBA_4_0/source/lib/messaging/messaging.c	2005-01-14 01:21:56 UTC (rev 4727)
@@ -514,7 +514,7 @@
 	fde.flags	= EVENT_FD_READ;
 	fde.handler	= messaging_listen_handler;
 
-	msg->event.ev   = ev;
+	msg->event.ev   = talloc_reference(msg,ev);
 	msg->event.fde	= event_add_fd(ev, &fde);
 
 	talloc_set_destructor(msg, messaging_destructor);



More information about the samba-cvs mailing list