Fix the svace 2.2 issues 27/102927/1 submit/tizen/20161219.233906
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 09:10:41 +0000 (18:10 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 23:56:00 +0000 (08:56 +0900)
Change-Id: I94c14228fc84ffe8ade49f17721caf4bb2e61920
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bt-syspopup-m.c
src/bt-syspopup-w.c

index 0e3f2445a4d1fee8bc89034695187b533b845fbe..2da6a8539695df3856fd553b6ba49d5a66f2f5a6 100644 (file)
@@ -2495,12 +2495,14 @@ static void __bluetooth_session_init(struct bt_popup_appdata *ad)
        g_type_init();
 #endif
 
-       conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
+       conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
 
        if (!conn) {
-               BT_ERR("ERROR: Can't get on system bus [%s]",
-                            err->message);
-               g_error_free(err);
+               if (err) {
+                       BT_ERR("ERROR: Can't get on system bus [%s]",
+                                    err->message);
+                       g_error_free(err);
+               }
                return;
        }
 
index f6c95afd918f2346389ca3d14ba953f50afb33ff..dffdd9dc5283a804da5abd271994162699ae48d8 100644 (file)
@@ -1908,12 +1908,14 @@ static void __bluetooth_session_init(struct bt_popup_appdata *ad)
        GDBusConnection *conn = NULL;
        GError *err = NULL;
 
-       conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
+       conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
 
        if (!conn) {
-               BT_ERR("ERROR: Can't get on system bus [%s]",
-                            err->message);
-               g_error_free(err);
+               if (err) {
+                       BT_ERR("ERROR: Can't get on system bus [%s]",
+                                    err->message);
+                       g_error_free(err);
+               }
                return;
        }