mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Fix filehandle leak in proc_get_jiffies
This commit is contained in:
parent
a475dd15e6
commit
36ef521c0e
1 changed files with 5 additions and 4 deletions
9
proc.cpp
9
proc.cpp
|
@ -845,15 +845,16 @@ unsigned long proc_get_jiffies(process_t *p)
|
||||||
&cnswap, &exit_signal, &processor
|
&cnswap, &exit_signal, &processor
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Don't need to check exit status of fclose on read-only streams
|
||||||
|
*/
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
if (count < 17)
|
if (count < 17)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Don't need to check exit status of fclose on read-only streams
|
|
||||||
*/
|
|
||||||
fclose(f);
|
|
||||||
return utime+stime+cutime+cstime;
|
return utime+stime+cutime+cstime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue