summary: Don't cache summary if none was returned

ostree_repo_remote_fetch_summary can set out_summary to NULL but
still return TRUE according to the documentation, so don't assume
that *out_summary will always be set.
tingping/wmclass
Sam Spilsbury 2016-06-01 05:58:21 +00:00
parent d3823c6528
commit d9ec859878
1 changed files with 4 additions and 0 deletions

View File

@ -3747,6 +3747,10 @@ flatpak_dir_cache_summary (FlatpakDir *self,
CachedSummary *summary;
GBytes *res = NULL;
/* No sense caching the summary if there isn't one */
if (!bytes)
return NULL;
G_LOCK (cache);
/* This was already initialized in the cache-miss lookup */