From e124fc5e1537946326ecc8fe574b4a34660d7233 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sat, 8 Oct 2005 23:19:18 +0000 Subject: [PATCH] close_mib2 if not already closed --- src/os/solaris/solaris_sigar.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 940d4af3..7d673d7e 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -140,9 +140,6 @@ int sigar_os_close(sigar_t *sigar) if (sigar->fsdev) { sigar_cache_destroy(sigar->fsdev); } - if (sigar->mib2.sd != -1) { - close_mib2(&sigar->mib2); - } free(sigar); return SIGAR_OK; } @@ -1545,6 +1542,7 @@ int sigar_net_route_list_get(sigar_t *sigar, } if (rc != GET_MIB2_EOD) { + close_mib2(&sigar->mib2); return SIGAR_EMIB2; } @@ -2042,6 +2040,7 @@ int sigar_net_connection_list_get(sigar_t *sigar, } if (rc != GET_MIB2_EOD) { + close_mib2(&sigar->mib2); return SIGAR_EMIB2; }