diff --git a/pysnmp/proto/mpmod/rfc3412.py b/pysnmp/proto/mpmod/rfc3412.py index 11c19606..5e2dd0e3 100644 --- a/pysnmp/proto/mpmod/rfc3412.py +++ b/pysnmp/proto/mpmod/rfc3412.py @@ -416,6 +416,9 @@ def prepare_response_message( or pduType is not None and pduType not in rfc3411.CONFIRMED_CLASS_PDUS ): + if securityModel in snmpEngine.security_models: + smHandler = snmpEngine.security_models[securityModel] + smHandler.release_state_information(securityStateReference) raise error.StatusInformation(errorIndication=errind.loopTerminated) # 7.1.3c