0019-pidof: Do not memleak pidof_root if multiple -c options.

This commit is contained in:
Qualys Security Advisory 1970-01-01 00:00:00 +00:00 committed by Craig Small
parent 55fac85bf0
commit 4abe4a51a0

View File

@ -324,6 +324,7 @@ int main (int argc, char **argv)
case 'c':
if (geteuid() == 0) {
opt_rootdir_check = 1;
safe_free(pidof_root);
pidof_root = pid_link(getpid(), "root");
}
break;