On Solaris, whenever there is a wrong regex as logmatch parameter, when the corresponding structures are being de-allocated, snmpd coredumps.
This is because we are freeing the structures using regfree(), even when the corresponding regcomp() returns with an error. The attached patch fixes the issue.
Thanks for the patch! A slightly modified version has been applied to Net-SNMP.