mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 10:31:14 -03:00
Fix filehandle leak in proc_get_jiffies
This commit is contained in:
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;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user