[gnome-software/gnome-3-10] Prevent memory corruption when doing	gs_plugin_loader_dedupe() more than once
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-software/gnome-3-10] Prevent memory corruption when doing	gs_plugin_loader_dedupe() more than once
- Date: Fri, 11 Oct 2013 11:03:20 +0000 (UTC)
commit a3bfc1d0b2ccb7ee0f39a103a00c4a3920b7b776
Author: Richard Hughes <richard hughsie com>
Date:   Fri Oct 11 12:01:09 2013 +0100
    Prevent memory corruption when doing gs_plugin_loader_dedupe() more than once
 src/gs-plugin-loader.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 38536df..e23a6e2 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -95,6 +95,10 @@ gs_plugin_loader_dedupe (GsPluginLoader *plugin_loader, GsApp *app)
 
        /* already exists */
        new_app = g_hash_table_lookup (priv->app_cache, gs_app_get_id (app));
+       if (new_app == app) {
+               new_app = app;
+               goto out;
+       }
        if (new_app != NULL) {
                /* already exists */
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]