Fix defects detected by static analysis tool 69/191069/2
authorJi-hoon Lee <dalton.lee@samsung.com>
Thu, 11 Oct 2018 06:33:43 +0000 (15:33 +0900)
committerJi-hoon Lee <dalton.lee@samsung.com>
Mon, 15 Oct 2018 00:35:44 +0000 (00:35 +0000)
Change-Id: I315b322be5fbecaa814bf9bfb404e1d626447804
Signed-off-by: Ji-hoon Lee <dalton.lee@samsung.com>
client/ma.c
client/ma_ui.c

index 816d3ec89debd8a447626d2961acff76285196c0..b0b432abf67de01b156e60bb00497ecf86347971 100644 (file)
@@ -231,7 +231,9 @@ int ma_deinitialize(void)
        }
 
        ma_state_e state;
-       ma_client_get_client_state(g_ma, &state);
+       if (0 != ma_client_get_client_state(g_ma, &state)) {
+               SLOG(LOG_ERROR, TAG_MAC, "[ERROR] A handle is not available"); //LCOV_EXCL_LINE
+       }
 
        /* check state */
        switch (state) {
index 053c51c3809b77a5ae7d30cfd610db3cc55b9df8..44b00b063d79efc92875ed7dbb67b630706bf131 100644 (file)
@@ -233,7 +233,9 @@ int ma_ui_deinitialze(void)
        }
 
        ma_state_e state;
-       ma_ui_client_get_client_state(g_ma_ui, &state);
+       if (0 != ma_ui_client_get_client_state(g_ma_ui, &state)) {
+               SLOG(LOG_ERROR, TAG_MAUI, "[UI ERROR] A handle is not available");
+       }
 
        /* check state */
        switch (state) {