summaryrefslogtreecommitdiffstats
path: root/plugins/check_snmp.c
diff options
context:
space:
mode:
authorThomas Guyot-Sionnest <dermoth@aei.ca>2009-10-22 07:25:41 (GMT)
committerThomas Guyot-Sionnest <dermoth@aei.ca>2009-10-22 07:25:41 (GMT)
commite7e9a99117d7e0a7189393b3a04366393620efab (patch)
treed46b980c32920ff5e1afe428ac73f9c7ab96a918 /plugins/check_snmp.c
parent9c1aa029c088d6d52c7978198136731925c5f385 (diff)
downloadmonitoring-plugins-e7e9a99117d7e0a7189393b3a04366393620efab.tar.gz
Fix usage of repeated -o options in check_snmp
Diffstat (limited to 'plugins/check_snmp.c')
-rw-r--r--plugins/check_snmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c
index db16462..dcb3138 100644
--- a/plugins/check_snmp.c
+++ b/plugins/check_snmp.c
@@ -506,7 +506,7 @@ process_arguments (int argc, char **argv)
506 */ 506 */
507 needmibs = TRUE; 507 needmibs = TRUE;
508 } 508 }
509 oids = calloc(MAX_OIDS, sizeof (char *)); 509 if (!oids) oids = calloc(MAX_OIDS, sizeof (char *));
510 for (ptr = strtok(optarg, ", "); ptr != NULL && j < MAX_OIDS; ptr = strtok(NULL, ", "), j++) { 510 for (ptr = strtok(optarg, ", "); ptr != NULL && j < MAX_OIDS; ptr = strtok(NULL, ", "), j++) {
511 oids[j] = strdup(ptr); 511 oids[j] = strdup(ptr);
512 } 512 }