rv = sqlite3_busy_handler(handle, _busy_handler, NULL);
if (rv != SQLITE_OK) {
err("fail to register busy handler err(%d), errmsg(%s)", rv, sqlite3_errmsg(handle));
+ sqlite3_close(handle);
return NULL;
}
out_param_data = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
for (local_index = 0; local_index < out_param_cnt; local_index++) {
- char tmp_key[10];
+ char tmp_key[32];
const unsigned char *tmp;
tmp = sqlite3_column_text(stmt, local_index);
snprintf(tmp_key, sizeof(tmp_key), "%d", local_index);
GSList **temp = out_param;
*temp = g_slist_append(*temp, out_param_data);
} else {
- char tmp_key_outter[10];
+ char tmp_key_outter[32];
snprintf(tmp_key_outter, sizeof(tmp_key_outter), "%d", outter_index);
g_hash_table_insert((GHashTable*)out_param, g_strdup(tmp_key_outter), out_param_data);
}