diff --git a/proc/meminfo.c b/proc/meminfo.c index f28b0b11..3f949450 100644 --- a/proc/meminfo.c +++ b/proc/meminfo.c @@ -859,6 +859,9 @@ PROCPS_EXPORT int procps_meminfo_unref ( if ((*info)->refcount < 1) { int errno_sav = errno; + if ((*info)->meminfo_fd != -1) + close((*info)->meminfo_fd); + if ((*info)->extents) meminfo_extents_free_all((*info)); if ((*info)->items) diff --git a/proc/vmstat.c b/proc/vmstat.c index 2a6b9514..511dcb4a 100644 --- a/proc/vmstat.c +++ b/proc/vmstat.c @@ -1356,6 +1356,9 @@ PROCPS_EXPORT int procps_vmstat_unref ( if ((*info)->refcount < 1) { int errno_sav = errno; + if ((*info)->vmstat_fd != -1) + close((*info)->vmstat_fd); + if ((*info)->extents) vmstat_extents_free_all((*info)); if ((*info)->items)