Integrated: JDK-8261167: print_process_memory_info add a close call after fopen

Matthias Baesken mbaesken at openjdk.java.net
Fri Feb 5 13:40:43 UTC 2021


On Thu, 4 Feb 2021 16:54:57 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> Hello, there is an fopen call opening "proc/self/status" in print_process_memory_info in os_linux.cpp. This call should also have a corresponding fclose-call.
> 
> See also the Sonar finding ("Opened stream never closed. Potential resource leak") :
> https://sonarcloud.io/project/issues?id=shipilev_jdk&open=AXck8BNvBBG2CXpcnaeA&resolved=false&severities=BLOCKER&types=BUG

This pull request has now been integrated.

Changeset: 43ae0cf8
Author:    Matthias Baesken <mbaesken at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/43ae0cf8
Stats:     28 lines in 1 file changed: 6 ins; 0 del; 22 mod

8261167: print_process_memory_info add a close call after fopen

Reviewed-by: stuefe, dholmes

-------------

PR: https://git.openjdk.java.net/jdk/pull/2409


More information about the hotspot-runtime-dev mailing list