mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 20:54:04 +08:00
Fix filehandle leak in proc_get_jiffies
This commit is contained in:
parent
a475dd15e6
commit
36ef521c0e
9
proc.cpp
9
proc.cpp
|
@ -845,15 +845,16 @@ unsigned long proc_get_jiffies(process_t *p)
|
|||
&cnswap, &exit_signal, &processor
|
||||
);
|
||||
|
||||
/*
|
||||
Don't need to check exit status of fclose on read-only streams
|
||||
*/
|
||||
fclose(f);
|
||||
|
||||
if (count < 17)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Don't need to check exit status of fclose on read-only streams
|
||||
*/
|
||||
fclose(f);
|
||||
return utime+stime+cutime+cstime;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user