Fixed to better handle socket timeouts - LP:1875517 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1046,8 +1046,12 @@ *pos = ' '; } buffer[i] = '\0'; - xasprintf (&full_page_new, "%s%s", full_page, buffer); - free (full_page); + /* xasprintf (&full_page_new, "%s%s", full_page, buffer); */ + if ((full_page_new = realloc(full_page, pagesize + i + 1)) == NULL) + die (STATE_UNKNOWN, _("HTTP UNKNOWN - Could not allocate memory for full_page\n")); + + memmove(&full_page_new[pagesize], buffer, i + 1); + /*free (full_page);*/ full_page = full_page_new; pagesize += i;