BUG: Do not leak ps FILE when the process starts but reading the header fails.

This commit is contained in:
Brad King 2006-03-08 11:57:41 -05:00
parent a155eacec3
commit c31c18bb9c
1 changed files with 4 additions and 1 deletions

View File

@ -1997,8 +1997,11 @@ static void kwsysProcessKill(pid_t process_id)
kwsysProcessKill(pid);
}
}
}
/* We are done with the ps process. */
/* We are done with the ps process. */
if(ps)
{
pclose(ps);
}
}