From 9876310f3855aa1f416d76f490e31cc1a13d6146 Mon Sep 17 00:00:00 2001 From: Kubo Takehiro Date: Thu, 25 Jul 2024 16:51:09 +0900 Subject: [PATCH] Don't call xfree outside of ruby threads. It seems to be the cause of test failures when using truffleruby. --- ext/oci8/oci8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index d4a1d8a4..8d2c65fa 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -437,7 +437,7 @@ typedef struct { static void *complex_logoff_prepare(oci8_svcctx_t *svcctx) { - complex_logoff_arg_t *cla = xmalloc(sizeof(complex_logoff_arg_t)); + complex_logoff_arg_t *cla = malloc(sizeof(complex_logoff_arg_t)); cla->svchp = svcctx->base.hp.svc; cla->usrhp = svcctx->usrhp; cla->srvhp = svcctx->srvhp; @@ -479,7 +479,7 @@ static void *complex_logoff_execute(void *arg) if (cla->svchp != NULL) { OCIHandleFree(cla->svchp, OCI_HTYPE_SVCCTX); } - xfree(cla); + free(cla); return (void*)(VALUE)rv; }