From 72880f7c39fa0fc673b8f2db7530f035d123b4b0 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Fri, 27 Nov 2015 22:14:08 +0100 Subject: [PATCH] snmp plugin: plug leak in error path. Partial back port of #1368. Signed-off-by: Florian Forster --- src/snmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/snmp.c b/src/snmp.c index 33a76e33..3d660418 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -656,7 +656,10 @@ static int csnmp_config_add_host (oconfig_item_t *ci) status = cf_util_get_string(ci, &hd->name); if (status != 0) + { + sfree (hd); return status; + } hd->sess_handle = NULL; hd->interval = 0; -- 2.30.2