diff --git a/src/os/solaris/solaris_sigar.c b/src/os/solaris/solaris_sigar.c index 82ffb6e0..69486f72 100644 --- a/src/os/solaris/solaris_sigar.c +++ b/src/os/solaris/solaris_sigar.c @@ -975,12 +975,14 @@ static int sigar_pgrab_modules(sigar_t *sigar, sigar_pid_t pid, } if ((pstatus = sigar_init_libproc(sigar)) != SIGAR_OK) { + close(fd); return pstatus; } pstatus = sigar_pgrab(sigar, pid, SIGAR_FUNC, &phandle); if (pstatus != SIGAR_OK) { + close(fd); return pstatus; }