diff --git a/src/hotspot/share/jvmci/jvmciEnv.cpp b/src/hotspot/share/jvmci/jvmciEnv.cpp index c930910dd4470..712745e2a021c 100644 --- a/src/hotspot/share/jvmci/jvmciEnv.cpp +++ b/src/hotspot/share/jvmci/jvmciEnv.cpp @@ -613,7 +613,7 @@ JVMCIEnv::~JVMCIEnv() { if (_init_error_msg != nullptr) { // The memory allocated in libjvmci was not allocated with os::malloc // so must not be freed with os::free. - ALLOW_C_FUNCTION(::free((void*) _init_error_msg)); + ALLOW_C_FUNCTION(::free, ::free((void*) _init_error_msg);) } if (_init_error != JNI_OK) { return;