diff options
author | Konrad Borowski <GlitchMr@users.noreply.github.com> | 2014-04-26 17:36:20 +0200 |
---|---|---|
committer | Konrad Borowski <GlitchMr@users.noreply.github.com> | 2014-04-26 17:36:20 +0200 |
commit | 36ef521c0e08e4920b29a3f72e337f21a9b5b807 (patch) | |
tree | a28492b00e435a846973941f1533bc811c6a1ecb /proc.cpp | |
parent | a475dd15e65759f2d20822cd3b19b874575c7f5e (diff) |
Fix filehandle leak in proc_get_jiffies
Diffstat (limited to 'proc.cpp')
-rw-r--r-- | proc.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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; } |