[gnome-software/gnome-3-26] plugin loader: Fix a crash in gs_plugin_loader_helper_free
- From: Kalev Lember <klember src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-26] plugin loader: Fix a crash in gs_plugin_loader_helper_free
- Date: Thu, 8 Feb 2018 11:51:33 +0000 (UTC)
commit 212d13f0c172f61a822bf5e38f4ea61434dd8e0a
Author: Kalev Lember <klember redhat com>
Date: Wed Jan 10 13:44:53 2018 +0100
plugin loader: Fix a crash in gs_plugin_loader_helper_free
Don't unconditionally dereference an app associated with a plugin job,
without checking first that it's non-NULL.
https://bugzilla.redhat.com/show_bug.cgi?id=1515467
lib/gs-plugin-loader.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index b21fd962..f427ba9d 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -210,7 +210,11 @@ gs_plugin_loader_helper_free (GsPluginLoaderHelper *helper)
case GS_PLUGIN_ACTION_INSTALL:
case GS_PLUGIN_ACTION_REMOVE:
case GS_PLUGIN_ACTION_UPDATE:
- gs_app_set_progress (gs_plugin_job_get_app (helper->plugin_job), 0);
+ {
+ GsApp *app = gs_plugin_job_get_app (helper->plugin_job);
+ if (app != NULL)
+ gs_app_set_progress (app, 0);
+ }
break;
default:
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]