From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../364105-check_http_memory_leak.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 web/attachments/364105-check_http_memory_leak.patch (limited to 'web/attachments/364105-check_http_memory_leak.patch') diff --git a/web/attachments/364105-check_http_memory_leak.patch b/web/attachments/364105-check_http_memory_leak.patch new file mode 100644 index 0000000..49a35b8 --- /dev/null +++ b/web/attachments/364105-check_http_memory_leak.patch @@ -0,0 +1,23 @@ +diff --git a/plugins/check_http.c b/plugins/check_http.c +index 0a4b12b..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)) { -- cgit v1.2.3-74-g34f1