X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_http.c;h=5cdf144bdf8b2bf788fe27dae84fedd52f410529;hb=6b782ebfd4832c1fe621556bcf894162b8caa8aa;hp=b4e60041f0fc1d27cb3b1f06007720590c1f05a3;hpb=08199792ba8bf19c2dbdc27f68689e571d4240a9;p=nagiosplug.git diff --git a/plugins/check_http.c b/plugins/check_http.c index b4e6004..5cdf144 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -784,6 +784,7 @@ check_http (void) int i = 0; size_t pagesize = 0; char *full_page; + char *full_page_new; char *buf; char *pos; long microsec; @@ -871,7 +872,9 @@ check_http (void) full_page = strdup(""); while ((i = my_recv (buffer, MAX_INPUT_BUFFER-1)) > 0) { buffer[i] = '\0'; - asprintf (&full_page, "%s%s", full_page, buffer); + asprintf (&full_page_new, "%s%s", full_page, buffer); + free (full_page); + full_page = full_page_new; pagesize += i; if (no_body && document_headers_done (full_page)) { @@ -1420,8 +1423,8 @@ print_usage (void) { printf (_("Usage:")); printf (" %s -H | -I [-u ] [-p ]\n",progname); - printf (" [-w ] [-c ] [-t ] [-L]\n"); - printf (" [-a auth] [-b proxy_auth] [-f ]\n"); + printf (" [-w ] [-c ] [-t ] [-L] [-a auth]\n"); + printf (" [-b proxy_auth] [-f ]\n"); printf (" [-e ] [-s string] [-l] [-r | -R ]\n"); printf (" [-P string] [-m :] [-4|-6] [-N] [-M ]\n"); printf (" [-A string] [-k string] [-S] [-C ] [-T ] [-j method]\n");