trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject [12/17] git commit: TS-2497: Memory leak with failed posts
Date Wed, 18 Jun 2014 23:51:38 GMT
TS-2497: Memory leak with failed posts


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/35906123
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/35906123
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/35906123

Branch: refs/heads/4.2.x
Commit: 3590612398a1e458a056541a5ca5d0dc44405183
Parents: abb3820
Author: Brian Geffon <briang@apache.org>
Authored: Tue May 13 09:49:36 2014 -0700
Committer: Brian Geffon <briang@apache.org>
Committed: Tue Jun 10 16:22:02 2014 -0700

----------------------------------------------------------------------
 proxy/http/HttpSM.cc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/35906123/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 66e6d6c..330b1e8 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4986,16 +4986,18 @@ HttpSM::handle_post_failure()
   // have the full post and it's deallocating the post buffers here
   enable_redirection = false;
   tunnel.deallocate_redirect_postdata_buffers();
-  tunnel.reset();
 
   // Don't even think about doing keep-alive after this debacle
   t_state.client_info.keep_alive = HTTP_NO_KEEPALIVE;
   t_state.current.server->keep_alive = HTTP_NO_KEEPALIVE;
 
   if (server_buffer_reader->read_avail() > 0) {
+    tunnel.reset();
     // There's data from the server so try to read the header
     setup_server_read_response_header();
   } else {
+    tunnel.deallocate_buffers();
+    tunnel.reset();
     // Server died
     vc_table.cleanup_entry(server_entry);
     server_entry = NULL;


Mime
View raw message