components/net-snmp/patches/013.6852099.proxy.patch
author Petr Cvachoucek <petr.cvachoucek@oracle.com>
Tue, 26 Jun 2012 23:39:53 -0700
branchs11-sru
changeset 2298 b90913c3e10b
parent 252 ee0fb1eabcbf
permissions -rw-r--r--
7154506 Solaris 11 snmpd core dumps when proxy option is used in snmpd.conf
--- a/agent/mibgroup/ucd-snmp/proxy.c	2006-10-17 18:16:29.000000000 +0200
+++ b/agent/mibgroup/ucd-snmp/proxy.c	2012-03-27 09:02:10.488425400 +0200
@@ -396,6 +396,8 @@
 
     if (!pdu || !sp) {
         netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_GENERR);
+        if (pdu)
+            snmp_free_pdu(pdu);
         return SNMP_ERR_NOERROR;
     }
 
@@ -408,6 +410,8 @@
                 /*
                  * too large 
                  */
+                if (pdu)
+                    snmp_free_pdu(pdu);
                 snmp_log(LOG_ERR,
                          "proxy oid request length is too long\n");
                 return SNMP_ERR_NOERROR;
@@ -437,6 +441,8 @@
      */
     if (!proxy_fill_in_session(handler, reqinfo, (void **)&configured)) {
         netsnmp_set_request_error(reqinfo, requests, SNMP_ERR_GENERR);
+        if (pdu)
+            snmp_free_pdu(pdu);
         return SNMP_ERR_NOERROR;
     }