Merge "Fix passing parameter after null" into tizen
[platform/core/uifw/tts.git] / common / tts_config_mgr.c
old mode 100644 (file)
new mode 100755 (executable)
index 8a54868..1304fc0
@@ -942,12 +942,16 @@ static int __tts_config_mgr_register_engine_config_updated_event(const char* pat
        SLOG(LOG_DEBUG, tts_tag(), "Add inotify watch(%s)", path);
        if (ino->dir_wd < 0) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add watch");
+               free(ino);
+               ino = NULL;
                return -1;
        }
 
        ino->dir_fd_handler = ecore_main_fd_handler_add(ino->dir_fd, ECORE_FD_READ, (Ecore_Fd_Cb)__tts_config_mgr_engine_config_inotify_event_callback, (void *)ino, NULL, NULL);
        if (NULL == ino->dir_fd_handler) {
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] Fail to add fd handler");
+               free(ino);
+               ino = NULL;
                return -1;
        }
 
@@ -1394,7 +1398,7 @@ int __tts_set_buxtonkey(const char* engine)
                SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_open failed!! (%d)", ret);
                return TTS_CONFIG_ERROR_OPERATION_FAILED;
        }
-       bux_layer = buxton_create_layer("user");
+       bux_layer = buxton_create_layer("system");
        if (NULL == bux_layer) {
                SLOG(LOG_ERROR, tts_tag(), "[DBUS-BUXTON2] buxton_create_layer FAIL");
                buxton_close(bux_cli);