16 lines
517 B
Diff
16 lines
517 B
Diff
|
diff -up sysstat-10.0.0/rd_stats.c.pom sysstat-10.0.0/rd_stats.c
|
||
|
--- sysstat-10.0.0/rd_stats.c.pom 2011-03-11 18:09:57.000000000 +0100
|
||
|
+++ sysstat-10.0.0/rd_stats.c 2011-05-04 07:59:28.000000000 +0200
|
||
|
@@ -1759,8 +1759,10 @@ void read_uptime(unsigned long long *upt
|
||
|
if ((fp = fopen(UPTIME, "r")) == NULL)
|
||
|
return;
|
||
|
|
||
|
- if (fgets(line, 128, fp) == NULL)
|
||
|
+ if (fgets(line, 128, fp) == NULL) {
|
||
|
+ close(fp);
|
||
|
return;
|
||
|
+ }
|
||
|
|
||
|
sscanf(line, "%lu.%lu", &up_sec, &up_cent);
|
||
|
*uptime = (unsigned long long) up_sec * HZ +
|