From: Ruben Kerkhof Date: Fri, 27 Nov 2015 21:14:08 +0000 (+0100) Subject: snmp plugin: plug leak in error path. X-Git-Tag: collectd-5.5.1~46 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=72880f7c39fa0fc673b8f2db7530f035d123b4b0;p=collectd.git snmp plugin: plug leak in error path. Partial back port of #1368. Signed-off-by: Florian Forster --- 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;