Skip to content

Commit 4fefd3e

Browse files
author
Patrick Soquet
committed
XS: secaudit issue #21
1 parent b8250d4 commit 4fefd3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xs/sources/xsAPI.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ txSlot* fxNewHostInstance(txMachine* the)
644644
the->stack->kind = XS_REFERENCE_KIND;
645645
if (prototype) {
646646
txSlot* prototypeHost = prototype->next;
647-
if (prototypeHost && (prototypeHost->kind == XS_HOST_KIND)) {
647+
if (prototypeHost && (prototypeHost->kind == XS_HOST_KIND) && (prototypeHost->value.host.variant.destructor != fxReleaseSharedChunk)) {
648648
txSlot* instanceHost = instance->next = fxNewSlot(the);
649649
instanceHost->flag = XS_INTERNAL_FLAG;
650650
instanceHost->kind = XS_HOST_KIND;

0 commit comments

Comments
 (0)