aboutsummaryrefslogtreecommitdiffstats
path: root/main/net-snmp/netsnmp-swinst-crash.patch
blob: 5502ddb28af2473203cb501e1dbe535a4c240964 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- net-snmp-5.7.1/agent/mibgroup/host/data_access/swinst_pkginfo.c
+++ /home/fabled//net-snmp-5.7.1.patched/agent/mibgroup/host/data_access/swinst_pkginfo.c
@@ -140,7 +140,8 @@
         memcpy( entry->swDate, cp, date_len );
         entry->swDate_len = date_len;
     }
-    closedir( d );
+    if (d != NULL)
+        closedir( d );
 
     DEBUGMSGTL(("swinst:load:arch"," loaded %d entries\n",
                 (int)CONTAINER_SIZE(container)));