[Pkg-nagios-changes] [pkg-nagios] r1832 - in nagios-plugins/trunk/debian: . patches
Jan Wagner
waja at alioth.debian.org
Wed Mar 3 08:14:37 UTC 2010
Author: waja
Date: 2010-03-03 08:14:36 +0000 (Wed, 03 Mar 2010)
New Revision: 1832
Added:
nagios-plugins/trunk/debian/patches/43_check_http_large_pages_mleak.dpatch
Modified:
nagios-plugins/trunk/debian/changelog
nagios-plugins/trunk/debian/patches/00list
Log:
check_http: add fix for large files
Modified: nagios-plugins/trunk/debian/changelog
===================================================================
--- nagios-plugins/trunk/debian/changelog 2010-02-23 15:36:26 UTC (rev 1831)
+++ nagios-plugins/trunk/debian/changelog 2010-03-03 08:14:36 UTC (rev 1832)
@@ -4,8 +4,10 @@
* Add some hints to NEWS.Debian about the use on non-linux archs
* Bump Standards-Version to 3.8.4, no changes needed
* Add 1.0 to debian/source/format
+ * Add 43_check_http_large_pages_mleak.dpatch, taken from upstream, which
+ fixes memory leaks on large files
- -- Jan Wagner <waja at cyconet.org> Sat, 23 Jan 2010 01:39:31 +0100
+ -- Jan Wagner <waja at cyconet.org> Wed, 03 Mar 2010 08:13:31 +0100
nagios-plugins (1.4.14-1) unstable; urgency=low
Modified: nagios-plugins/trunk/debian/patches/00list
===================================================================
--- nagios-plugins/trunk/debian/patches/00list 2010-02-23 15:36:26 UTC (rev 1831)
+++ nagios-plugins/trunk/debian/patches/00list 2010-03-03 08:14:36 UTC (rev 1832)
@@ -18,3 +18,4 @@
40_check_http_proxy_auth.dpatch
41_check_ping_detect_args.dpatch
42_check_linux_raid_fix_r10.dpatch
+43_check_http_large_pages_mleak.dpatch
Added: nagios-plugins/trunk/debian/patches/43_check_http_large_pages_mleak.dpatch
===================================================================
--- nagios-plugins/trunk/debian/patches/43_check_http_large_pages_mleak.dpatch (rev 0)
+++ nagios-plugins/trunk/debian/patches/43_check_http_large_pages_mleak.dpatch 2010-03-03 08:14:36 UTC (rev 1832)
@@ -0,0 +1,41 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 43_check_http_large_pages_mleak.dpatch
+## From: Ton Voon <ton.voon at opsera.com>
+## Date: Fri, 26 Feb 2010 12:47:38 +0000
+## Subject: [PATCH] Fix memory leak in check_http for large pages (Jimmy Bergman - #2957455)
+## X-Git-Url: http://repo.or.cz/w/nagiosplugins.git?a=commitdiff_plain;h=6b782ebfd4832c1fe621556bcf894162b8caa8aa
+##
+## DP: Fix memory leak in check_http for large pages
+
+ at DPATCH@
+
+---
+ plugins/check_http.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletions(-)
+
+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)) {
+--
+1.6.3
+
More information about the Pkg-nagios-changes
mailing list