summaryrefslogtreecommitdiff
path: root/user/net-snmp/netsnmp-swinst-crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/net-snmp/netsnmp-swinst-crash.patch')
-rw-r--r--user/net-snmp/netsnmp-swinst-crash.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/user/net-snmp/netsnmp-swinst-crash.patch b/user/net-snmp/netsnmp-swinst-crash.patch
new file mode 100644
index 000000000..58c368fac
--- /dev/null
+++ b/user/net-snmp/netsnmp-swinst-crash.patch
@@ -0,0 +1,13 @@
+--- a/agent/mibgroup/host/data_access/swinst_pkginfo.c.orig
++++ b/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