summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--THANKS.in1
-rw-r--r--lib/utils_base.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/THANKS.in b/THANKS.in
index 189ba26..aba48c6 100644
--- a/THANKS.in
+++ b/THANKS.in
@@ -254,3 +254,4 @@ Ben Timby
254Martin Foster 254Martin Foster
255Joe Presbrey 255Joe Presbrey
256Will Preston 256Will Preston
257Nikita Kalabukhov
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 77700f5..4303e15 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -101,7 +101,9 @@ _set_thresholds(thresholds **my_thresholds, char *warn_string, char *critical_st
101{ 101{
102 thresholds *temp_thresholds = NULL; 102 thresholds *temp_thresholds = NULL;
103 103
104 temp_thresholds = malloc(sizeof(temp_thresholds)); 104 if ((temp_thresholds = malloc(sizeof(thresholds))) == NULL)
105 die(STATE_UNKNOWN, _("Cannot allocate memory: %s\n"),
106 strerror(errno));
105 107
106 temp_thresholds->warning = NULL; 108 temp_thresholds->warning = NULL;
107 temp_thresholds->critical = NULL; 109 temp_thresholds->critical = NULL;