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:
Ximalas 2021-10-11 22:04:02 +02:00 committed by BenBE
parent d1c833fe95
commit 2128edfba2
1 changed files with 1 additions and 1 deletions

View File

@ -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