pidof: Do not memleak pidof_root if multiple -c options.
This commit is contained in:
parent
bba9f384c0
commit
ab8b3881a0
1
pidof.c
1
pidof.c
@ -318,6 +318,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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user