chiark / gitweb /
[PATCH] udevd: fix valgrind warning
authormbuesch@freenet.de <mbuesch@freenet.de>
Sat, 5 Feb 2005 23:09:34 +0000 (00:09 +0100)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 06:24:19 +0000 (23:24 -0700)
==4304== Syscall param sigaction(act) contains uninitialised or unaddressable byte(s)
==4304==    at 0x804A37B: (within /sbin/udevd)
==4304==  Address 0x52BFE7FC is on thread 1's stack

udevd.c

diff --git a/udevd.c b/udevd.c
index 53c7bf3df1bd0055b46c24d1caaeb02f042f57f3..7d7fd63332baf664b9ba111e3553115aeca993fc 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -690,6 +690,7 @@ int main(int argc, char *argv[], char *envp[])
                dbg("error fcntl on write pipe: %s", strerror(errno));
 
        /* set signal handlers */
+       memset(&act, 0x00, sizeof(struct sigaction));
        act.sa_handler = (void (*) (int))sig_handler;
        sigemptyset(&act.sa_mask);
        act.sa_flags = SA_RESTART;