netsnmp-swinst-crash.patch 309 B

1234567891011121314
  1. --- a/agent/mibgroup/host/data_access/swinst_pkginfo.c.orig
  2. +++ b/agent/mibgroup/host/data_access/swinst_pkginfo.c
  3. @@ -207,7 +207,9 @@
  4. memcpy( entry->swDate, cp, date_len );
  5. entry->swDate_len = date_len;
  6. }
  7. - closedir( d );
  8. + if (d != NULL)
  9. + closedir( d );
  10. +
  11. #ifdef HAVE_LIBPKG
  12. }
  13. #endif