Permalink
Browse files

xfree or die hard.

  • Loading branch information...
1 parent f537de0 commit 6504c37d6c3c6bf92a867b918ac61b51372c57d5 @flavorjones flavorjones committed with Mar 2, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 ext/sqlite3/database.c
View
@@ -291,9 +291,10 @@ static void rb_sqlite3_func(sqlite3_context * ctx, int argc, sqlite3_value **arg
for(i = 0; i < argc; i++) {
params[i] = sqlite3val2rb(argv[i]);
}
- xfree(params);
VALUE result = rb_funcall2(callable, rb_intern("call"), argc, params);
+ xfree(params);
+
set_sqlite3_func_result(ctx, result);
}
@@ -349,8 +350,8 @@ static void rb_sqlite3_step(sqlite3_context * ctx, int argc, sqlite3_value **arg
for(i = 0; i < argc; i++) {
params[i] = sqlite3val2rb(argv[i]);
}
- xfree(params);
rb_funcall2(callable, rb_intern("step"), argc, params);
+ xfree(params);
}
static void rb_sqlite3_final(sqlite3_context * ctx)

0 comments on commit 6504c37

Please sign in to comment.