On Tue, Jun 24, 2014 at 3:47 AM, Sean Burke <sean.bu...@pacbell.net> wrote:

> Hi All,
>
> I am writing to ask about this code in 5.7.2.1 snmp_api.c at line 5423.
> I am specifically concerned with the constraint pdu->command ==
> SNMP_MSG_TRAP2,
> which appears to interfere with freeing the securityStateRef for request
> command
> types, e.g. GET, SET, GET-NEXT, GET-BULK.
>
> Testing with valgrind indicates that removing the pdu-command constraint
> fixes a leak.
> Is this an error, or is there a rationale that I do not understand?
>
> Thanks,
> -SEan
>
>   /*
>
>
>
>
>    * Call USM to free any securityStateRef supplied with the message.
>
>
>
>
>    */
>   if (pdu != NULL && pdu->securityStateRef &&
>       pdu->command == SNMP_MSG_TRAP2) {
>     sptr = find_sec_mod(pdu->securityModel);
>     if (sptr) {
>       if (sptr->pdu_free_state_ref) {
>         (*sptr->pdu_free_state_ref) (pdu->securityStateRef);
>       } else {
>         snmp_log(LOG_ERR,
>                  "Security Model %d can't free state references\n",
>                  pdu->securityModel);
>       }
>     } else {
>       snmp_log(LOG_ERR,
>                "Can't find security model to free ptr: %d\n",
>                pdu->securityModel);
>     }
>     pdu->securityStateRef = NULL;
>   }
>
>
Can you say what operation you perform to cause this leak?  (E.g., authPriv
SNMPv3 GET?)

  Bill
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to