Skip to content

Commit

Permalink
Don't call xfree outside of ruby threads.
Browse files Browse the repository at this point in the history
It seems to be the cause of test failures when using truffleruby.
  • Loading branch information
kubo committed Jul 25, 2024
1 parent 95b4b2c commit 9876310
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/oci8/oci8.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9876310

Please sign in to comment.