HomeFreeBSD

Call snmp_pdu_free on req/resp with a consistent, correct pattern

Description

Call snmp_pdu_free on req/resp with a consistent, correct pattern

  • snmp_pdu_free should be called before snmp_pdu_create is called again
  • snmp_pdu_free should be called on the resp to snmp_dialog when successful

Tested with the following bsnmp commands:

% export SNMPUSER=bsnmp SNMPPASSWD=bsnmptest
% SNMP_ARGS="-A proto=sha -C context='' -K -P proto=des -v 3 -r 0"
% bsnmpset $SNMP_ARGS sysLocation="MyAgent"
% bsnmpget $SNMP_ARGS sysLocation
% bsnmpwalk $SNMP_ARGS

MFC after: 12 days
X-MFC with: r310729, r310892, r310894

Details

Provenance
ngieAuthored on
Parents
rS310988: snmp_discover_engine: fix up req/resp (PDU object) handling a bit
Branches
Unknown
Tags
Unknown