pmap: remove memory leaks

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
Sami Kerola 2012-11-02 17:50:51 +00:00 committed by Craig Small
parent c043c47ddd
commit e677476aea

5
pmap.c
View File

@ -520,7 +520,7 @@ static int one_proc(proc_t * p)
}
}
fclose(fp);
if (!q_option) {
if (x_option) {
if (sizeof(KLONG) == 8) {
@ -593,7 +593,7 @@ static void range_arguments(char *optarg)
int main(int argc, char **argv)
{
unsigned *pidlist;
unsigned long *pidlist;
unsigned count = 0;
PROCTAB *PT;
proc_t p;
@ -692,6 +692,7 @@ int main(int argc, char **argv)
count--;
}
closeproc(PT);
free(pidlist);
if (count)
/* didn't find all processes asked for */