trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject [1/2] git commit: TS-2497: Memory leak with failed posts
Date Tue, 13 May 2014 16:49:51 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/master 5d2c24a3d -> 842a06ed8


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/bcdd0494
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bcdd0494
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bcdd0494

Branch: refs/heads/master
Commit: bcdd0494b7c9dccba13a2c541a5a24cee3315451
Parents: 63400cb
Author: Brian Geffon <briang@apache.org>
Authored: Tue May 13 09:49:36 2014 -0700
Committer: Brian Geffon <briang@apache.org>
Committed: Tue May 13 09:49:36 2014 -0700

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


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bcdd0494/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 3ff0397..578c15d 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4940,16 +4940,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