diff options
author | Alexander Larsson <alexl@redhat.com> | 2019-09-10 15:55:13 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2019-09-10 15:55:13 +0200 |
commit | d73ce0c508eaae6652c5d49c49fa9a0c70f120a7 (patch) | |
tree | ec61df04d72149d65e38664d6ccf53be142ea9c3 | |
parent | e2752abf28266fd0c6f27ba6be084fe0285c9285 (diff) | |
download | flatpak-d73ce0c508eaae6652c5d49c49fa9a0c70f120a7.tar.gz |
Fix leak in flatpak_dir_find_remote_related_for_metadata
This puts the checksum autoptr in the inner scope of the loop where
it gets assigned to avoid leaking all but the last iteration value.
-rw-r--r-- | common/flatpak-dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index 9a35e3bb..92f5e0e7 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -13579,7 +13579,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 *checksum = NULL; int branch_i; /* Parse actual extension name */ @@ -13616,6 +13615,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; + g_autofree char *checksum = NULL; const char *branch = branches[branch_i]; extension_ref = g_build_filename ("runtime", extension, parts[2], branch, NULL); |