mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-05-28 12:11:05 +00:00
status/graphite: fix memory leak, avoid cyclic closure reference
The data passed to this closure was never free'd, depending on the count of VM/CTs one could get >1 MB of RSS (!) memory leaked per statd status cycle update run... We could also use Scalar::Util's weaken, to weak a copy of this variable, but as a simple undef works lets do that with a comment.. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
1e4ae7d44c
commit
db2ce4886c
@ -141,6 +141,8 @@ sub assemble {
|
||||
}
|
||||
};
|
||||
$assemble_graphite_data->($data, $path);
|
||||
|
||||
$assemble_graphite_data = undef; # avoid cyclic reference!
|
||||
}
|
||||
|
||||
PVE::JSONSchema::register_format('graphite-path', \&pve_verify_graphite_path);
|
||||
|
Loading…
Reference in New Issue
Block a user