From e2ad94a6abad9f62741d420955601b10c527682b Mon Sep 17 00:00:00 2001 From: "sooyeon.kim" Date: Mon, 16 Oct 2017 11:26:12 +0900 Subject: [PATCH] Fix coverity - dbus_connection_unref Change-Id: Id53a2235885cdbb9895ce0426d945f44c700ef1b Signed-off-by: sooyeon.kim --- client/stt_dbus.c | 2 -- server/sttd_dbus.c | 4 ---- 2 files changed, 6 deletions(-) diff --git a/client/stt_dbus.c b/client/stt_dbus.c index f62b0a4..e616520 100644 --- a/client/stt_dbus.c +++ b/client/stt_dbus.c @@ -652,12 +652,10 @@ static void __stt_dbus_connection_free() { if (NULL != g_conn_listener) { dbus_connection_close(g_conn_listener); - dbus_connection_unref(g_conn_listener); g_conn_listener = NULL; } if (NULL != g_conn_sender) { dbus_connection_close(g_conn_sender); - dbus_connection_unref(g_conn_sender); g_conn_sender = NULL; } } diff --git a/server/sttd_dbus.c b/server/sttd_dbus.c index fcc04ff..28298be 100644 --- a/server/sttd_dbus.c +++ b/server/sttd_dbus.c @@ -504,17 +504,14 @@ void __sttd_dbus_connection_free() { if (NULL != g_conn_listener) { dbus_connection_close(g_conn_listener); - dbus_connection_unref(g_conn_listener); g_conn_listener = NULL; } if (NULL != g_conn_sender) { dbus_connection_close(g_conn_sender); - dbus_connection_unref(g_conn_sender); g_conn_sender = NULL; } if (NULL != g_conn_custom) { dbus_connection_close(g_conn_custom); - dbus_connection_unref(g_conn_custom); g_conn_custom = NULL; } } @@ -678,7 +675,6 @@ int __sttd_request_custom_dbus_name() } dbus_connection_close(g_conn_custom); - dbus_connection_unref(g_conn_custom); g_conn_custom = NULL; SLOG(LOG_DEBUG, TAG_STTD, "=="); -- 2.7.4