snmp plugin: Fix double free of request PDU
authorPavel Rochnyack <pavel2000@ngs.ru>
Wed, 31 May 2017 16:27:13 +0000 (23:27 +0700)
committerFlorian Forster <octo@collectd.org>
Wed, 27 Sep 2017 06:15:35 +0000 (08:15 +0200)
commitd16c24542b2f96a194d43a73c2e5778822b9cb47
tree454e14ce444e992c937b23b27c57a75aec1bc2e3
parent6c082e955466f0c451d608fb3cbb31481c02fa37
snmp plugin: Fix double free of request PDU

snmp_sess_synch_response() always frees request PDU, in both case of request
error and success. If error condition occurs inside of `while (status == 0)`
loop, double free of `req` happens.

Issue: #2291
Signed-off-by: Florian Forster <octo@collectd.org>
src/snmp.c