Skip to content

Commit

Permalink
query: disk: fix memory leak
Browse files Browse the repository at this point in the history
total heap usage: 1,000 allocs, 1,000 frees, 2,435,149 bytes allocated
  • Loading branch information
Toni500github committed Jun 29, 2024
1 parent 490a22d commit 744917b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/query/disk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ Disk::Disk(const std::string_view path) {
m_typefs = pDevice->mnt_type;
break;
}

if (mountsFile)
free(mountsFile);

m_bInit = true;
}
Expand Down

0 comments on commit 744917b

Please sign in to comment.