Fixed leak. Don't set .timeout anymore.

* netload.c: (glibtop_get_netload_s): Fixed leak.
	* proctime.c: (glibtop_get_proc_time_s): Don't set .timeout anymore.
This commit is contained in:
Benoît Dejean
2004-07-22 13:46:25 +00:00
parent 995ca5afb9
commit e8158ec1b1
3 changed files with 10 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2004-07-22 Benoît Dejean <tazforever@dlfp.org>
* netload.c: (glibtop_get_netload_s): Fixed leak.
* proctime.c: (glibtop_get_proc_time_s): Don't set .timeout anymore.
2004-07-17 Benoît Dejean <tazforever@dlfp.org>
* Makefile.am:

View File

@@ -416,6 +416,7 @@ glibtop_get_netload_s (glibtop *server, glibtop_netload *buf,
else
buf->scope6 = GLIBTOP_IF_IN6_SCOPE_UNKNOWN;
freeifaddrs(ifa0);
buf->flags |= _glibtop_sysdeps_netload_6;
} /* IPV6 */

View File

@@ -70,9 +70,11 @@ glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid)
buf->cutime = strtoull (p, &p, 0);
buf->cstime = strtoull (p, &p, 0);
p = skip_multiple_token (p, 2);
p = skip_multiple_token (p, 3);
buf->timeout = strtoull (p, &p, 0);
// timeout is 0 on 2.4 and "thread_number" on 2.6
// lets skip it (using previous skip_multiple_token)
// buf->timeout = strtoull (p, &p, 0);
buf->it_real_value = strtoull (p, &p, 0);
buf->start_time = strtoull (p, &p, 0);