Fix memory leaks of dbus
[platform/core/uifw/voice-control.git] / client / vc_widget_dbus.c
index 59d7a60..14d3f4d 100644 (file)
@@ -274,10 +274,12 @@ static void __vc_mgr_dbus_connection_free()
 {
        if (NULL != g_w_conn_listener) {
                dbus_connection_close(g_w_conn_listener);
+               dbus_connection_unref(g_w_conn_listener);
                g_w_conn_listener = NULL;
        }
        if (NULL != g_w_conn_sender) {
                dbus_connection_close(g_w_conn_sender);
+               dbus_connection_unref(g_w_conn_sender);
                g_w_conn_sender = NULL;
        }
 }