pidof: Do not memleak the contents of proc_t.
Just like "pgrep: Do not memleak the contents of proc_t."
This commit is contained in:
parent
031bc56f65
commit
6f2f033142
3
pidof.c
3
pidof.c
@ -158,7 +158,6 @@ static void select_procs (void)
|
|||||||
safe_free(root_link);
|
safe_free(root_link);
|
||||||
|
|
||||||
if (!match) { /* root check failed */
|
if (!match) { /* root check failed */
|
||||||
memset (&task, 0, sizeof (task));
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -233,8 +232,6 @@ static void select_procs (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
memset (&task, 0, sizeof (task));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
closeproc (ptp);
|
closeproc (ptp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user