aboutsummaryrefslogtreecommitdiff
path: root/plugins/check_snmp.c
diff options
context:
space:
mode:
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);
}