Skip to content
Permalink
Browse files
8261593: Do not use NULL pointer as write buffer parameter in jfrEmer…
…gencyDump.cpp write_repository_files

Reviewed-by: stuefe, mgronlun
  • Loading branch information
MBaesken committed Feb 12, 2021
1 parent 60a2072 commit 92ff891877f228894c8fd4c77170a1cd793b9cd6
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp
@@ -369,9 +369,10 @@ static void write_emergency_dump_file(const RepositoryIterator& iterator) {
if (copy_block == NULL) {
log_error(jfr, system)("Unable to malloc memory during jfr emergency dump");
log_error(jfr, system)("Unable to write jfr emergency dump file");
} else {
write_repository_files(iterator, copy_block, block_size);
os::free(copy_block);
}
write_repository_files(iterator, copy_block, block_size);
os::free(copy_block);
}

void JfrEmergencyDump::on_vm_error(const char* repository_path) {

1 comment on commit 92ff891

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 92ff891 Feb 12, 2021

Please sign in to comment.