aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_snmp.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-10-22 03:25:41 -0400
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2009-10-22 03:25:41 -0400
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 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);
}