svace fix 40/213940/1 submit/tizen/20190917.020352
authorsanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 17 Sep 2019 01:29:42 +0000 (10:29 +0900)
committersanghyeok.oh <sanghyeok.oh@samsung.com>
Tue, 17 Sep 2019 01:30:13 +0000 (10:30 +0900)
Change-Id: Ice65d826b4331e3bbb2ef02a10652a7223a317e5
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
tests/unit_tests.c

index dda922710dfed3aea6fc2c2ea7409d89ed5aa306..f6a9e3222209f222ba31d44c7f8f3cd516837ab3 100644 (file)
@@ -123,13 +123,18 @@ static guint signal_subscribe(struct context *ctx)
                        NULL,
                        &error);
        if (!msg) {
-               printf("LoadUnit method call error: %s\n", error->message);
+               if (error) {
+                       printf("LoadUnit method call error: %s\n", error->message);
+                       g_error_free(error);
+               } else {
+                       printf("LoadUnit method call error\n");
+               }
+
                goto cleanup;
        }
 
        g_variant_get(msg, "(o)", &path);
 
-       error = NULL;
        /* PropertiesChanged signal subscribe */
        ctx->subscription_id = g_dbus_connection_signal_subscribe(
                                ctx->bus,
@@ -144,7 +149,7 @@ static guint signal_subscribe(struct context *ctx)
                                NULL
                        );
        if (ctx->subscription_id == 0) {
-               printf("signal subscription error: %s\n", error->message);
+               printf("signal subscription error\n");
                goto cleanup;
        }