library: at unref, close these cached file descriptors
Signed-off-by: Jim Warner <james.warner@comcast.net>
This commit is contained in:
parent
f8f3ea2527
commit
15a6203b00
@ -859,6 +859,9 @@ PROCPS_EXPORT int procps_meminfo_unref (
|
|||||||
if ((*info)->refcount < 1) {
|
if ((*info)->refcount < 1) {
|
||||||
int errno_sav = errno;
|
int errno_sav = errno;
|
||||||
|
|
||||||
|
if ((*info)->meminfo_fd != -1)
|
||||||
|
close((*info)->meminfo_fd);
|
||||||
|
|
||||||
if ((*info)->extents)
|
if ((*info)->extents)
|
||||||
meminfo_extents_free_all((*info));
|
meminfo_extents_free_all((*info));
|
||||||
if ((*info)->items)
|
if ((*info)->items)
|
||||||
|
@ -1356,6 +1356,9 @@ PROCPS_EXPORT int procps_vmstat_unref (
|
|||||||
if ((*info)->refcount < 1) {
|
if ((*info)->refcount < 1) {
|
||||||
int errno_sav = errno;
|
int errno_sav = errno;
|
||||||
|
|
||||||
|
if ((*info)->vmstat_fd != -1)
|
||||||
|
close((*info)->vmstat_fd);
|
||||||
|
|
||||||
if ((*info)->extents)
|
if ((*info)->extents)
|
||||||
vmstat_extents_free_all((*info));
|
vmstat_extents_free_all((*info));
|
||||||
if ((*info)->items)
|
if ((*info)->items)
|
||||||
|
Loading…
Reference in New Issue
Block a user