From: Ruben Kerkhof Date: Mon, 14 May 2018 20:12:28 +0000 (+0200) Subject: snmp plugin: add some missing error handling X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=28bd919cbf46d9951596460b4074b99a2bfcc4a1;p=collectd.git snmp plugin: add some missing error handling Fixes CID #179226 --- diff --git a/src/snmp.c b/src/snmp.c index 433f5f86..3e5e3819 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -598,13 +598,13 @@ static int csnmp_config_add_host(oconfig_item_t *ci) { else if (strcasecmp("Version", option->key) == 0) status = csnmp_config_add_host_version(hd, option); else if (strcasecmp("Timeout", option->key) == 0) - cf_util_get_cdtime(option, &hd->timeout); + status = cf_util_get_cdtime(option, &hd->timeout); else if (strcasecmp("Retries", option->key) == 0) - cf_util_get_int(option, &hd->retries); + status = cf_util_get_int(option, &hd->retries); else if (strcasecmp("Collect", option->key) == 0) - csnmp_config_add_host_collect(hd, option); + status = csnmp_config_add_host_collect(hd, option); else if (strcasecmp("Interval", option->key) == 0) - cf_util_get_cdtime(option, &hd->interval); + status = cf_util_get_cdtime(option, &hd->interval); else if (strcasecmp("Username", option->key) == 0) status = cf_util_get_string(option, &hd->username); else if (strcasecmp("AuthProtocol", option->key) == 0)