By reading the current HEAD I stumbled on a memory leak in killall.c
as well as a not assigned pointer got_long in load_proc_cmdline()
which may lead to SIGSEGV.
References: [patches:#67] https://sourceforge.net/p/psmisc/bugs/67
Signed-off-by: Werner Fink <werner@suse.de>
if (verbose)
fprintf (stderr, _("killall: skipping partial match %s(%d)\n"),
comm, pid);
- return -1;
*got_long = okay;
+ return -1;
}
+ *got_long = okay;
return 0;
}
exit (1);
}
}
+ got_long = 0;
for (i = 0; i < pids; i++)
{
pid_t id;
if ( older_than && process_age_sec && (process_age_sec < older_than ) )
continue;
+ if (command)
+ free(command);
got_long = 0;
command = NULL; /* make gcc happy */
if (length == COMM_LEN - 1)