8280002: jmap -histo may leak stream
Reviewed-by: shade, sspitsyn
This commit is contained in:
parent
fb8fdc0fbf
commit
c359c358c8
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -292,6 +292,7 @@ static jint heap_inspection(AttachOperation* op, outputStream* out) {
|
|||||||
uintx num;
|
uintx num;
|
||||||
if (!Arguments::parse_uintx(num_str, &num, 0)) {
|
if (!Arguments::parse_uintx(num_str, &num, 0)) {
|
||||||
out->print_cr("Invalid parallel thread number: [%s]", num_str);
|
out->print_cr("Invalid parallel thread number: [%s]", num_str);
|
||||||
|
delete fs;
|
||||||
return JNI_ERR;
|
return JNI_ERR;
|
||||||
}
|
}
|
||||||
parallel_thread_num = num == 0 ? parallel_thread_num : (uint)num;
|
parallel_thread_num = num == 0 ? parallel_thread_num : (uint)num;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user