Add the memory free for node_info 78/72478/1 accepted/tizen/common/20160602.140355 accepted/tizen/ivi/20160602.231209 accepted/tizen/mobile/20160602.231220 accepted/tizen/wearable/20160602.231158 submit/tizen/20160602.084136
authorHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 1 Jun 2016 07:15:47 +0000 (16:15 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 1 Jun 2016 07:15:47 +0000 (16:15 +0900)
Change-Id: Ibcbfd4c922dd23e85830d03a42322bb7c912dbd9
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
ag-agent/bluetooth-ag-agent.c

index 737d3b9..c78474d 100755 (executable)
@@ -3480,7 +3480,7 @@ static gboolean __bt_ag_register_profile_methods(void)
        FN_START;
        GError *error = NULL;
        guint owner_id;
-       GDBusNodeInfo *node_info;
+       GDBusNodeInfo *node_info = NULL;
        gchar *path;
 
        owner_id = g_bus_own_name(G_BUS_TYPE_SYSTEM,
@@ -3507,6 +3507,7 @@ static gboolean __bt_ag_register_profile_methods(void)
                ERR("Failed to register: %s", error->message);
                g_error_free(error);
                g_free(path);
+               g_dbus_node_info_unref(node_info);
                return FALSE;
        }
        g_free(path);
@@ -3524,9 +3525,11 @@ static gboolean __bt_ag_register_profile_methods(void)
                ERR("Failed to register: %s", error->message);
                g_error_free(error);
                g_free(path);
+               g_dbus_node_info_unref(node_info);
                return FALSE;
        }
        g_free(path);
+       g_dbus_node_info_unref(node_info);
 
        node_info = __bt_ag_create_method_node_info
                                (ag_agent_app_introspection_xml);
@@ -3544,9 +3547,11 @@ static gboolean __bt_ag_register_profile_methods(void)
                ERR("Failed to register: %s", error->message);
                g_error_free(error);
                g_free(path);
+               g_dbus_node_info_unref(node_info);
                return FALSE;
        }
        g_free(path);
+       g_dbus_node_info_unref(node_info);
 
        FN_END;
        return TRUE;