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:
parent
8c12940a66
commit
8239d5c365
1 changed files with 2 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue