From e7e9a99117d7e0a7189393b3a04366393620efab Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Thu, 22 Oct 2009 03:25:41 -0400 Subject: Fix usage of repeated -o options in check_snmp --- plugins/check_snmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/check_snmp.c') diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index db16462b..dcb31386 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -506,7 +506,7 @@ process_arguments (int argc, char **argv) */ needmibs = TRUE; } - oids = calloc(MAX_OIDS, sizeof (char *)); + if (!oids) oids = calloc(MAX_OIDS, sizeof (char *)); for (ptr = strtok(optarg, ", "); ptr != NULL && j < MAX_OIDS; ptr = strtok(NULL, ", "), j++) { oids[j] = strdup(ptr); } -- cgit v1.2.3