Skip to content

Commit 158a014

Browse files
committed
backport 5dfda66e13df5a88a66a6e4b1ae1bcd4e20ac674
1 parent df7d2c6 commit 158a014

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

  • src/java.base/share/native/libjli

src/java.base/share/native/libjli/java.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1995, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1462,6 +1462,7 @@ InitializeJVM(JavaVM **pvm, JNIEnv **penv, InvocationFunctions *ifn)
14621462

14631463
r = ifn->CreateJavaVM(pvm, (void **)penv, &args);
14641464
JLI_MemFree(options);
1465+
options = NULL;
14651466
return r == JNI_OK;
14661467
}
14671468

@@ -2150,6 +2151,7 @@ FreeKnownVMs()
21502151
knownVMs[i].name = NULL;
21512152
}
21522153
JLI_MemFree(knownVMs);
2154+
knownVMs = NULL;
21532155
}
21542156

21552157
/*
@@ -2223,8 +2225,9 @@ ShowSplashScreen()
22232225
(void)UnsetEnv(SPLASH_JAR_ENV_ENTRY);
22242226

22252227
JLI_MemFree(splash_jar_entry);
2228+
splash_jar_entry = NULL;
22262229
JLI_MemFree(splash_file_entry);
2227-
2230+
splash_file_entry = NULL;
22282231
}
22292232

22302233
static const char* GetFullVersion()

0 commit comments

Comments
 (0)