summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-02-15 16:17:34 +0100
committerVolker Lendecke <vl@samba.org>2012-02-15 17:58:36 +0100
commit9e25361203155c25d5deee4acd1fce638808cdbf (patch)
tree03fa4e5056bf4d3f81c95b64de645c5edb8ce778 /lib
parent740d4d75500ac1ac224deb67cb3f20a21addb64b (diff)
downloadsamba-9e25361203155c25d5deee4acd1fce638808cdbf.tar.gz
samba-9e25361203155c25d5deee4acd1fce638808cdbf.tar.bz2
samba-9e25361203155c25d5deee4acd1fce638808cdbf.zip
tevent_signal: Fix a valgrind error
This fixes an uninitialized read introduced by my fix for the tevent_signal destructors. From looking at the code you might believe that this kicks in only when talloc failed. But with -O3 I do see it in normal operations. Sorry for that. Autobuild-User: Volker Lendecke <vl@samba.org> Autobuild-Date: Wed Feb 15 17:58:37 CET 2012 on sn-devel-104
Diffstat (limited to 'lib')
-rw-r--r--lib/tevent/tevent_signal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 248dd35883..77ef7b0599 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -346,6 +346,8 @@ int tevent_common_check_signal(struct tevent_context *ev)
struct tevent_signal *se = sl->se;
struct tevent_se_exists *exists;
+ next = sl->next;
+
/*
* We have to be careful to not touch "se"
* after it was deleted in its handler. Thus
@@ -361,7 +363,6 @@ int tevent_common_check_signal(struct tevent_context *ev)
talloc_set_destructor(
exists, tevent_se_exists_destructor);
- next = sl->next;
#ifdef SA_SIGINFO
if (se->sa_flags & SA_SIGINFO) {
uint32_t j;