mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8152730: File Leak in CompileBroker::init_compiler_thread_log of compileBroker.cpp:1665
Added missing code to close file pointer. Reviewed-by: kvn
This commit is contained in:
parent
9acc5ad3ce
commit
34f5c263b6
1 changed files with 4 additions and 0 deletions
|
@ -1651,6 +1651,10 @@ void CompileBroker::init_compiler_thread_log() {
|
||||||
tty->print_cr("Opening compilation log %s", file_name);
|
tty->print_cr("Opening compilation log %s", file_name);
|
||||||
}
|
}
|
||||||
CompileLog* log = new(ResourceObj::C_HEAP, mtCompiler) CompileLog(file_name, fp, thread_id);
|
CompileLog* log = new(ResourceObj::C_HEAP, mtCompiler) CompileLog(file_name, fp, thread_id);
|
||||||
|
if (log == NULL) {
|
||||||
|
fclose(fp);
|
||||||
|
return;
|
||||||
|
}
|
||||||
thread->init_log(log);
|
thread->init_log(log);
|
||||||
|
|
||||||
if (xtty != NULL) {
|
if (xtty != NULL) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue