mirror of
https://github.com/flatpak/flatpak.git
synced 2026-02-22 01:44:10 -05:00
flatpak_dir_find_remote_related_for_metadata: Fix leak
Move extension_ref into the loop so its freed every iteration. Closes: #1964 Approved by: mwleeds
This commit is contained in:
committed by
Atomic Bot
parent
335f69675e
commit
a6bec60d24
@@ -11929,7 +11929,6 @@ flatpak_dir_find_remote_related_for_metadata (FlatpakDir *self,
|
||||
g_autofree char *extension_collection_id = NULL;
|
||||
const char *default_branches[] = { NULL, NULL};
|
||||
const char **branches;
|
||||
g_autofree char *extension_ref = NULL;
|
||||
g_autofree char *checksum = NULL;
|
||||
int branch_i;
|
||||
|
||||
@@ -11966,6 +11965,7 @@ flatpak_dir_find_remote_related_for_metadata (FlatpakDir *self,
|
||||
|
||||
for (branch_i = 0; branches[branch_i] != NULL; branch_i++)
|
||||
{
|
||||
g_autofree char *extension_ref = NULL;
|
||||
const char *branch = branches[branch_i];
|
||||
|
||||
extension_ref = g_build_filename ("runtime", extension, parts[2], branch, NULL);
|
||||
|
||||
Reference in New Issue
Block a user