chiark / gitweb /
core/killall.c: prevent segfault and initialize pids
authorHarald Hoyer <harald@redhat.com>
Wed, 3 Apr 2013 13:16:06 +0000 (15:16 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 3 Apr 2013 13:17:51 +0000 (15:17 +0200)
src/core/killall.c

index 7f0dbb9..e078012 100644 (file)
@@ -189,7 +189,7 @@ static int killall(int sig, Set *pids) {
 
 void broadcast_signal(int sig, bool wait_for_exit) {
         sigset_t mask, oldmask;
 
 void broadcast_signal(int sig, bool wait_for_exit) {
         sigset_t mask, oldmask;
-        Set *pids;
+        Set *pids = NULL;
 
         if (wait_for_exit)
                 pids = set_new(trivial_hash_func, trivial_compare_func);
 
         if (wait_for_exit)
                 pids = set_new(trivial_hash_func, trivial_compare_func);