fixes column types error

This commit is contained in:
jazzyb
2015-02-28 11:10:18 -05:00
parent 0492391175
commit 2a32ad90e6
2 changed files with 11 additions and 2 deletions

View File

@@ -587,8 +587,7 @@ do_column_types(ErlNifEnv *env, sqlite3_stmt *stmt)
for(i = 0; i < size; i++) {
type = sqlite3_column_decltype(stmt, i);
if(type == NULL) {
free(array);
return make_error_tuple(env, "sqlite3_malloc_failure");
type = "nil";
}
array[i] = make_atom(env, type);