pmxcfs: status: add one more missing g_free

Otherwise we leak the memory that was already allocated for `filename`.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
Tested-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Reviewed-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
Link: https://lore.proxmox.com/20250801095431.117317-1-l.wagner@proxmox.com
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Lukas Wagner 2025-08-01 11:54:27 +02:00 committed by Thomas Lamprecht
parent 8c12940a66
commit 8239d5c365

View file

@ -1367,6 +1367,8 @@ static void update_rrd_data(const char *key, gconstpointer data, size_t len) {
} else if (g_file_test(filename_pve2, G_FILE_TEST_EXISTS)) {
// old file exists, use it
use_pve2_file = 1;
g_free(filename);
filename = g_strdup_printf("%s", filename_pve2);
} else {
// neither file exists, check for directories to decide and create file