Skip to content
Permalink
Browse files
8261939: os::strdup_check_oom() should be used in os::same_files() in…
… os_windows.cpp

Reviewed-by: minqi
  • Loading branch information
calvinccheung committed Feb 18, 2021
1 parent 5f30829 commit b8fd61420c6aeda7bcd80be6fa5e341debbbb7c0
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/hotspot/os/windows/os_windows.cpp
@@ -4481,9 +4481,9 @@ bool os::same_files(const char* file1, const char* file2) {
return true;
}

char* native_file1 = os::strdup(file1);
char* native_file1 = os::strdup_check_oom(file1);
native_file1 = os::native_path(native_file1);
char* native_file2 = os::strdup(file2);
char* native_file2 = os::strdup_check_oom(file2);
native_file2 = os::native_path(native_file2);
if (strcmp(native_file1, native_file2) == 0) {
os::free(native_file1);

1 comment on commit b8fd614

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on b8fd614 Feb 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.