goto ERROR;
}
while (sqlite3_step(stmt) == SQLITE_ROW) {
+ if (value) {
+ free(value);
+ value = NULL;
+ }
str = (const char *) sqlite3_column_text(stmt, COL_VALUE);
value = (!str || !strlen(str)) ? NULL : strdup(str);
}
if (ret != SQLITE_OK) {
_E("sqlite error [%d]", ret);
__close_db_connector();
+ if (value) {
+ free(value);
+ value = NULL;
+ }
return NULL;
}
__close_db_connector();
static void __close_db_connector(void)
{
if (s_info.db_connector != NULL) {
- sqlite3_exec(s_info.db_connector, "COMMIT TRANSACTION", NULL, NULL, NULL);
+ int ret = sqlite3_exec(s_info.db_connector, "COMMIT TRANSACTION", NULL, NULL, NULL);
+ if (ret != SQLITE_OK) {
+ LOGE("SQL error(%d)", ret);
+ }
sqlite3_close(s_info.db_connector);
s_info.db_connector = NULL;
}
static void __execute_auto_open_app(APPS_ICON_INFO *icon_info, int pos)
{
int is_open = 0;
- vconf_get_int(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, &is_open);
-
+ if (vconf_get_int(VCONFKEY_SETAPPL_AUTO_OPEN_APPS, &is_open) < 0)
+ _E("Failed to get VCONFKEY_SETAPPL_AUTO_OPEN_APPS");
if (is_open)
__execute_focus_icon(icon_info, pos);
}
g_error_free(error);
}
_E("dbus_connection_send error(%s:%s-%s)", path, interface, member);
+ g_object_unref(msg);
return -1;
}
case PAGE_DIRECTION_CENTER: {
if (util_feature_enabled_get(FEATURE_CLOCK_SELECTOR) != 1)
no_effect = 1;
-
+ int ret = -1;
app_control_h app_control_handle = NULL;
- app_control_create(&app_control_handle);
+ ret = app_control_create(&app_control_handle);
+ if (ret != APP_CONTROL_ERROR_NONE) {
+ _D("app_control_create failed");
+ break;
+ }
app_control_set_app_id(app_control_handle, "org.tizen.watch-setting");
app_control_add_extra_data(app_control_handle, "launch-type", "watchface");
- app_control_send_launch_request(app_control_handle, NULL, NULL);
+ ret = app_control_send_launch_request(app_control_handle, NULL, NULL);
+ if (ret != APP_CONTROL_ERROR_NONE)
+ _D("app_control_send_launch_request failed");
app_control_destroy(app_control_handle);
break;
}