diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_curl.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c index 67ae2b0..6294fa0 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c | |||
@@ -1062,11 +1062,7 @@ GOT_FIRST_CERT: | |||
1062 | bcopy("...",&output_header_search[sizeof(output_header_search)-4],4); | 1062 | bcopy("...",&output_header_search[sizeof(output_header_search)-4],4); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | char *tmp = malloc(DEFAULT_BUFFER_SIZE); | 1065 | char tmp[DEFAULT_BUFFER_SIZE]; |
1066 | |||
1067 | if (tmp == NULL) { | ||
1068 | die(STATE_UNKNOWN, "Failed to allocate buffer for output: %s\n", strerror(errno)); | ||
1069 | } | ||
1070 | 1066 | ||
1071 | snprintf (tmp, | 1067 | snprintf (tmp, |
1072 | DEFAULT_BUFFER_SIZE, | 1068 | DEFAULT_BUFFER_SIZE, |
@@ -1079,7 +1075,6 @@ GOT_FIRST_CERT: | |||
1079 | server_url); | 1075 | server_url); |
1080 | 1076 | ||
1081 | strcpy(msg, tmp); | 1077 | strcpy(msg, tmp); |
1082 | free(tmp); | ||
1083 | 1078 | ||
1084 | result = STATE_CRITICAL; | 1079 | result = STATE_CRITICAL; |
1085 | } | 1080 | } |