RFR: JDK-8261167: print_process_memory_info add a close call after fopen [v2]
David Holmes
dholmes at openjdk.java.net
Fri Feb 5 08:43:41 UTC 2021
On Fri, 5 Feb 2021 08:03:03 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
>
> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision:
>
> Add explicit NULL check and output in failure case
Marked as reviewed by dholmes (Reviewer).
-------------
PR: https://git.openjdk.java.net/jdk/pull/2409
More information about the hotspot-runtime-dev
mailing list