summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45e205f)
raw | patch | inline | side by side (parent: 45e205f)
author | Ton Voon <ton.voon@opsera.com> | |
Fri, 26 Feb 2010 12:47:38 +0000 (12:47 +0000) | ||
committer | Ton Voon <ton.voon@opsera.com> | |
Fri, 26 Feb 2010 12:47:38 +0000 (12:47 +0000) |
NEWS | patch | blob | history | |
THANKS.in | patch | blob | history | |
plugins/check_http.c | patch | blob | history |
index 667e1f0e33d48f89147e7c458ba2cd03350e8ff2..443389ab407c420769e667b64d36214432a2f234 100644 (file)
--- a/NEWS
+++ b/NEWS
check_icmp now increment the sequence counter in each packet
Fix usage of repeated -o options in check_snmp
Try to detect arguments passed via --with-ping[6]-command and set options accordingly (#2908236)
+ Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
WARNINGS
Updated developer documentation to say that performance labels should not have an equals sign or
single quote in the label
diff --git a/THANKS.in b/THANKS.in
index 89caf28f7d127953b44e671061a4e4a990503ab4..19663032aa0cc0f10966e2968ce6e6a2dbfb00b2 100644 (file)
--- a/THANKS.in
+++ b/THANKS.in
Grant Byers
Marcel Kuiper
Bryan Irvine
+Jimmy Bergman
diff --git a/plugins/check_http.c b/plugins/check_http.c
index 0a4b12bb9a413ead9c58d0d74a3c7159cb0eac25..5cdf144bdf8b2bf788fe27dae84fedd52f410529 100644 (file)
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
int i = 0;
size_t pagesize = 0;
char *full_page;
+ char *full_page_new;
char *buf;
char *pos;
long microsec;
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)) {