Ensure we do not pass uninitialised data to the kernel. (Picked up by
authorAndrew Bartlett <abartlet@samba.org>
Mon, 13 Jan 2003 08:09:32 +0000 (08:09 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 13 Jan 2003 08:09:32 +0000 (08:09 +0000)
valgrind).

Andrew Bartlett

source/smbd/notify_kernel.c
source/smbd/oplock_linux.c

index df553721ef7e7da9184d33afb165e50c9c4d3740..8b7ff21ecb944e6848e677d2c127437fe43e8d4b 100644 (file)
@@ -215,6 +215,8 @@ struct cnotify_fns *kernel_notify_init(void)
        static struct cnotify_fns cnotify;
         struct sigaction act;
 
+       ZERO_STRUCT(act);
+
         act.sa_handler = NULL;
         act.sa_sigaction = signal_handler;
         act.sa_flags = SA_SIGINFO;
index 85f89c12a068e555808f91262e4c66132fc972bd..deed0c51073af1d584a347004445ecb66d464662 100644 (file)
@@ -279,6 +279,8 @@ struct kernel_oplocks *linux_init_kernel_oplocks(void)
                return NULL;
        }
 
+       ZERO_STRUCT(act);
+
        act.sa_handler = NULL;
        act.sa_sigaction = signal_handler;
        act.sa_flags = SA_SIGINFO;