kumquat-buildroot/package/netsnmp/netsnmp-swinst-crash.patch
Luca Ceresoli 8a28f7e8ac netsnmp: bump to 5.7.1 LTS
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2011-12-07 16:52:24 +01:00

18 lines
625 B
Diff

Fixes runtime error with uClibc (and possibly others).
Original patch and bug description:
http://sourceforge.net/tracker/?func=detail&aid=3436528&group_id=12694&atid=312694
--- 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)));