summaryrefslogtreecommitdiffstats
path: root/plugins/check_curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_curl.c')
-rw-r--r--plugins/check_curl.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index ba856a11..e3e514ff 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -69,10 +69,6 @@ const char *email = "devel@monitoring-plugins.org";
69#include <netdb.h> 69#include <netdb.h>
70 70
71enum { 71enum {
72 MAX_IPV4_HOSTLENGTH = 255,
73};
74
75enum {
76 REGS = 2, 72 REGS = 2,
77}; 73};
78 74
@@ -789,21 +785,21 @@ redir_wrapper redir(curlhelp_write_curlbuf *header_buf, const check_curl_config
789 /* set new values for redirected request */ 785 /* set new values for redirected request */
790 786
791 if (!(config.followsticky & STICKY_HOST)) { 787 if (!(config.followsticky & STICKY_HOST)) {
792 free(working_state.server_address); 788 // free(working_state.server_address);
793 working_state.server_address = strndup(new_host, MAX_IPV4_HOSTLENGTH); 789 working_state.server_address = strndup(new_host, MAX_IPV4_HOSTLENGTH);
794 } 790 }
795 if (!(config.followsticky & STICKY_PORT)) { 791 if (!(config.followsticky & STICKY_PORT)) {
796 working_state.serverPort = (unsigned short)new_port; 792 working_state.serverPort = (unsigned short)new_port;
797 } 793 }
798 794
799 free(working_state.host_name); 795 // free(working_state.host_name);
800 working_state.host_name = strndup(new_host, MAX_IPV4_HOSTLENGTH); 796 working_state.host_name = strndup(new_host, MAX_IPV4_HOSTLENGTH);
801 797
802 /* reset virtual port */ 798 /* reset virtual port */
803 working_state.virtualPort = working_state.serverPort; 799 working_state.virtualPort = working_state.serverPort;
804 800
805 free(new_host); 801 free(new_host);
806 free(working_state.server_url); 802 // free(working_state.server_url);
807 working_state.server_url = new_url; 803 working_state.server_url = new_url;
808 804
809 uriFreeUriMembersA(&uri); 805 uriFreeUriMembersA(&uri);