[glib] appinfo: Don't leak the session bus in launch_default_with_portal_async



commit 26e0b3dde4bfb32eb10658140b9f63e04f76b60e
Author: Mario Sanchez Prada <mario endlessm com>
Date:   Thu Mar 23 10:16:35 2017 +0000

    appinfo: Don't leak the session bus in launch_default_with_portal_async
    
    The session bus object needs to be unreferenced before early returning.

 gio/gappinfo.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index 5c4baa2..d3e92e1 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -783,6 +783,7 @@ launch_default_with_portal_async (const char          *uri,
       if (real_uri == NULL)
         {
           g_task_report_error (context, callback, user_data, NULL, error);
+          g_object_unref (session_bus);
           return;
         }
     }


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