Skip to content

Commit

Permalink
8261939: os::strdup_check_oom() should be used in os::same_files() in…
Browse files Browse the repository at this point in the history
… os_windows.cpp

Reviewed-by: minqi
  • Loading branch information
calvinccheung committed Feb 18, 2021
1 parent 5f30829 commit b8fd614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hotspot/os/windows/os_windows.cpp
Expand Up @@ -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);
Expand Down

1 comment on commit b8fd614

@openjdk-notifier
Copy link

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.