From 0c4768bc3ffe30c6ab6f7b40274e41d5f611cc38 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 24 Sep 2009 19:45:53 +0000 Subject: Clear up SNMP pdu after decoding. This frees strings. --- common/snmp-engine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/snmp-engine.c b/common/snmp-engine.c index 0c1aa87..9f85321 100644 --- a/common/snmp-engine.c +++ b/common/snmp-engine.c @@ -596,6 +596,7 @@ request_response (int fd, int type, void* arg) req = hsh_get (snmp_processing, &id, sizeof (id)); if(!req) { log_debug ("received extra, cancelled or delayed packet from: %s", hostname); + snmp_pdu_clear (&pdu); return; } @@ -622,6 +623,7 @@ request_response (int fd, int type, void* arg) request_failure (req, pdu.error_status); } + snmp_pdu_clear (&pdu); } static void -- cgit v1.2.3