diff options
author | Antoine Jacoutot <[email protected]> | 2011-05-24 11:15:08 +0000 |
---|---|---|
committer | Benjamin Valentin <[email protected]> | 2012-03-17 15:45:43 +0100 |
commit | 3178d77b55f106694ad9aa1e27f437ac1cca862b (patch) | |
tree | f5b0cca4773de2ad8de12ab8c91f70dc95830ee1 /src | |
parent | 3b3bddfeea90ce4d33aa137d6b64b066e81324f3 (diff) | |
download | mate-power-manager-3178d77b55f106694ad9aa1e27f437ac1cca862b.tar.bz2 mate-power-manager-3178d77b55f106694ad9aa1e27f437ac1cca862b.tar.xz |
Don't try to close a non-opened fd
On OpenBSD we do not use /proc. As a result, gnome-power-manager segfaults on
startup due to a reverse logic in the code.
Signed-off-by: Richard Hughes <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gpm-load.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpm-load.c b/src/gpm-load.c index eab0129..3b0f572 100644 --- a/src/gpm-load.c +++ b/src/gpm-load.c @@ -192,7 +192,7 @@ gpm_load_get_cpu_values (long unsigned *cpu_idle, long unsigned *cpu_total) *cpu_total = cpu_user + cpu_nice + cpu_system + *cpu_idle; ret = TRUE; out: - if (!fd) + if (fd) fclose (fd); return ret; } |