mirror of
https://github.com/xzeldon/htop.git
synced 2025-04-08 03:57:08 +03:00
Plug the memory leak for the Disk I/O meter
There are no functions in libdevstat to initialise or clean up memory. The simplest change is to mark the local variable info as static.
This commit is contained in:
parent
d1c833fe95
commit
2128edfba2
@ -284,7 +284,7 @@ bool Platform_getDiskIO(DiskIOData* data) {
|
|||||||
if (devstat_checkversion(NULL) < 0)
|
if (devstat_checkversion(NULL) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
struct devinfo info = { 0 };
|
static struct devinfo info = { 0 };
|
||||||
struct statinfo current = { .dinfo = &info };
|
struct statinfo current = { .dinfo = &info };
|
||||||
|
|
||||||
// get number of devices
|
// get number of devices
|
||||||
|
Loading…
x
Reference in New Issue
Block a user