summaryrefslogtreecommitdiffstats
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)
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 }