mirror of https://github.com/xzeldon/htop.git
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)
|
||||
return false;
|
||||
|
||||
struct devinfo info = { 0 };
|
||||
static struct devinfo info = { 0 };
|
||||
struct statinfo current = { .dinfo = &info };
|
||||
|
||||
// get number of devices
|
||||
|
|
Loading…
Reference in New Issue