[gnome-software] trivial: Fix a NULL dereference if the AppData file cannot be read



commit d30a6c4f45251103589ccb143a6a96b4a8f25600
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 8 12:08:31 2013 +0100

    trivial: Fix a NULL dereference if the AppData file cannot be read

 src/plugins/gs-plugin-appdata.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appdata.c b/src/plugins/gs-plugin-appdata.c
index eb30f66..2de763d 100644
--- a/src/plugins/gs-plugin-appdata.c
+++ b/src/plugins/gs-plugin-appdata.c
@@ -464,7 +464,8 @@ gs_plugin_refine_by_local_appdata (GsApp *app,
 out:
        if (ctx != NULL)
                g_markup_parse_context_free (ctx);
-       g_free (helper->lang);
+       if (helper != NULL)
+               g_free (helper->lang);
        g_free (helper);
        g_free (data);
        return ret;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]