diff options
Diffstat (limited to 'plugins/check_http.c')
-rw-r--r-- | plugins/check_http.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 41d47816..1835a2d0 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -1095,9 +1095,14 @@ check_http (void) | |||
1095 | *pos = ' '; | 1095 | *pos = ' '; |
1096 | } | 1096 | } |
1097 | buffer[i] = '\0'; | 1097 | buffer[i] = '\0'; |
1098 | xasprintf (&full_page_new, "%s%s", full_page, buffer); | 1098 | |
1099 | free (full_page); | 1099 | if ((full_page_new = realloc(full_page, pagesize + i + 1)) == NULL) |
1100 | die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate memory for full_page\n")); | ||
1101 | |||
1102 | memmove(&full_page_new[pagesize], buffer, i + 1); | ||
1103 | |||
1100 | full_page = full_page_new; | 1104 | full_page = full_page_new; |
1105 | |||
1101 | pagesize += i; | 1106 | pagesize += i; |
1102 | 1107 | ||
1103 | if (no_body && document_headers_done (full_page)) { | 1108 | if (no_body && document_headers_done (full_page)) { |