Skip to content

Commit

Permalink
8325470: [AIX] use fclose after fopen in read_psinfo
Browse files Browse the repository at this point in the history
Backport-of: 4513da949670dfd29ca64183edc78ca44432aeb3
  • Loading branch information
MBaesken committed Feb 26, 2024
1 parent 08f9237 commit 69aa4ab
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/hotspot/os/aix/os_perf_aix.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, IBM Corp.
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2022, 2024, IBM Corp.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -87,6 +87,7 @@ static bool read_psinfo(const u_longlong_t& pid, psinfo_t& psinfo) {
}

len = fread(&psinfo, 1, sizeof(psinfo_t), fp);
fclose(fp);
return len == sizeof(psinfo_t);
}

Expand Down

1 comment on commit 69aa4ab

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.