void-packages/srcpkgs/net-snmp/patches/netsnmp-swinst-crash.patch
2015-05-08 11:57:34 +02:00

13 lines
305 B
Diff

--- agent/mibgroup/host/data_access/swinst_pkginfo.c.orig
+++ agent/mibgroup/host/data_access/swinst_pkginfo.c
@@ -207,7 +207,9 @@
memcpy( entry->swDate, cp, date_len );
entry->swDate_len = date_len;
}
- closedir( d );
+ if (d != NULL)
+ closedir( d );
+
#ifdef HAVE_LIBPKG
}
#endif