Skip to content

Commit cfedcc9

Browse files
committed
Fix missing handle in OpenSSL
PullRequest: truffleruby/487
2 parents 928a1db + fac6b63 commit cfedcc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/c/openssl/ossl_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ npn_select_cb_common_i(VALUE tmp)
646646
in += l;
647647
}
648648

649-
selected = rb_funcall(args->cb, rb_intern("call"), 1, protocols);
649+
selected = rb_funcall(rb_tr_managed_from_handle(args->cb), rb_intern("call"), 1, protocols);
650650
StringValue(selected);
651651
len = RSTRING_LEN(selected);
652652
if (len < 1 || len >= 256) {
@@ -665,7 +665,7 @@ ssl_npn_select_cb_common(SSL *ssl, VALUE cb, const unsigned char **out,
665665
int status;
666666
struct npn_select_cb_common_args args;
667667

668-
args.cb = cb;
668+
args.cb = rb_tr_handle_for_managed_leaking(cb);
669669
args.in = in;
670670
args.inlen = inlen;
671671

0 commit comments

Comments
 (0)