summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2020-06-15 16:46:38 -0700
committerAlexander Larsson <alexander.larsson@gmail.com>2020-06-22 10:33:47 +0200
commit4f04637b242bafa089b631767a81a0057f4d20da (patch)
treec98720f3b023fccccdf80d49191ad80d5f4f96be
parent09a8b8b0a2b42ae93447e4a0d5a0cf5fe9256168 (diff)
downloadflatpak-4f04637b242bafa089b631767a81a0057f4d20da.tar.gz
dir: Fix an error path with unset GError
This fixes a place where we omit passing a GError pointer and therefore potentially return FALSE without setting the passed in error. This causes flatpak_installation_list_installed_refs_for_update() to hit an assertion failure, crashing libflatpak (and subsequently the App Center when it's used). The debug log provided by the user shows messages being printed from flatpak_dir_prepare_resolve_p2p_refs_helper() for only a subset of the refs being resolved, and then the log stops since the process crashes, so that's how I know with near certainty that this patch fixes the crash experienced by the user on the forum.[1] Cherry-picked from https://github.com/endlessm/flatpak/pull/224 [1] https://community.endlessos.com/t/appcenter-closes-after-startup/13308
-rw-r--r--common/flatpak-dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c
index b3eb9881..c3ab8bcf 100644
--- a/common/flatpak-dir.c
+++ b/common/flatpak-dir.c
@@ -4012,7 +4012,7 @@ flatpak_dir_prepare_resolve_p2p_refs_helper (FlatpakDir *self,
if (resolve->local_commit == NULL || latest_rev == NULL)
continue;
- if (!ostree_repo_load_commit (state->child_repo, resolve->local_commit, &commit_data, NULL, NULL))
+ if (!ostree_repo_load_commit (state->child_repo, resolve->local_commit, &commit_data, NULL, error))
return FALSE;
local_timestamp = ostree_commit_get_timestamp (commit_data);