# HG changeset patch # User ecaspole # Date 1512054086 18000 # Node ID 995ed4b92655ce110dcbe3f80aa772ba114a6129 # Parent ea5906610227d3f60933e198f313d2cc29920497# Parent 464c63eb6d1fd70934ad5da8132a833d213c10ff Merge diff -r ea5906610227 -r 995ed4b92655 src/hotspot/os/linux/osContainer_linux.cpp --- a/src/hotspot/os/linux/osContainer_linux.cpp Thu Nov 30 09:59:27 2017 -0500 +++ b/src/hotspot/os/linux/osContainer_linux.cpp Thu Nov 30 10:01:26 2017 -0500 @@ -323,7 +323,12 @@ } } - if (mntinfo != NULL) fclose(mntinfo); + fclose(mntinfo); + + if (memory == NULL || cpuset == NULL || cpu == NULL || cpuacct == NULL) { + log_debug(os, container)("Required cgroup subsystems not found"); + return; + } /* * Read /proc/self/cgroup and map host mount point to @@ -383,12 +388,7 @@ } } - if (cgroup != NULL) fclose(cgroup); - - if (memory == NULL || cpuset == NULL || cpu == NULL) { - log_debug(os, container)("Required cgroup subsystems not found"); - return; - } + fclose(cgroup); // We need to update the amount of physical memory now that // command line arguments have been processed.