BUG/MINOR: checks: queues null-deref
queues can be null if calloc() failed.
Bypass free* calls when calloc did fail.
diff --git a/src/checks.c b/src/checks.c
index 52c762b..5772c4f 100644
--- a/src/checks.c
+++ b/src/checks.c
@@ -3235,7 +3235,7 @@
if ((queues = calloc(mls->count, sizeof(*queues))) == NULL) {
memprintf(err, "out of memory while allocating mailer alerts queues");
- goto error;
+ goto fail_no_queue;
}
for (mailer = mls->mailer_list; mailer; i++, mailer = mailer->next) {
@@ -3292,6 +3292,7 @@
free_check(check);
}
free(queues);
+ fail_no_queue:
return 1;
}