svn commit: samba r20984 - in branches/SAMBA_4_0/source/lib/events:
.
abartlet at samba.org
abartlet at samba.org
Tue Jan 23 22:28:22 GMT 2007
Author: abartlet
Date: 2007-01-23 22:28:21 +0000 (Tue, 23 Jan 2007)
New Revision: 20984
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20984
Log:
Try to ensure we can't have sig_state dissapear before se.
I think this happens when both are eventual children of the autofree context.
(Trying to track down a valgrind error on fort).
Andrew Bartlett
Modified:
branches/SAMBA_4_0/source/lib/events/events_signal.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/events/events_signal.c
===================================================================
--- branches/SAMBA_4_0/source/lib/events/events_signal.c 2007-01-23 20:57:50 UTC (rev 20983)
+++ branches/SAMBA_4_0/source/lib/events/events_signal.c 2007-01-23 22:28:21 UTC (rev 20984)
@@ -171,6 +171,11 @@
se->private_data = private_data;
se->signum = signum;
se->sa_flags = sa_flags;
+
+ /* Ensure, no matter the destruction order, that we always have a handle on the global sig_state */
+ if (!talloc_reference(se, sig_state)) {
+ return NULL;
+ }
/* only install a signal handler if not already installed */
if (sig_state->sig_handlers[signum] == NULL) {
More information about the samba-cvs
mailing list