summaryrefslogtreecommitdiffstats
path: root/main/net-snmp/netsnmp-swinst-crash.patch
blob: 58c368facc2a990b2c86bdceb5094f6e7d56e93b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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