From 6c5f781bc58cef0a28ab2dbc7eeb1391df3ba009 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Sat, 8 Nov 2008 02:32:03 +0000 Subject: Fixed bug where extra headers and redirect caused segfault (Dieter Van de Walle - 2089159) git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2076 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins/check_http.c') diff --git a/plugins/check_http.c b/plugins/check_http.c index df5daf2d..0746741c 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -815,7 +815,9 @@ check_http (void) for ((pos = strtok(http_opt_headers[i], INPUT_DELIMITER)); pos; (pos = strtok(NULL, INPUT_DELIMITER))) asprintf (&buf, "%s%s\r\n", buf, pos); } - free(http_opt_headers); + /* This cannot be free'd here because a redirection will then try to access this and segfault */ + /* Covered in a testcase in tests/check_http.t */ + /* free(http_opt_headers); */ } /* optionally send the authentication info */ -- cgit v1.2.3-74-g34f1