Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. diff --git a/proxy/http/HttpClientSession.h b/proxy/http/HttpClientSession.h
  2. index 5c5ae53..261db0d 100644
  3. --- a/proxy/http/HttpClientSession.h
  4. +++ b/proxy/http/HttpClientSession.h
  5. @@ -128,6 +128,12 @@ public:
  6. upgrade_to_h2c = true;
  7. }
  8.  
  9. + void
  10. + release_current_reader()
  11. + {
  12. + current_reader = NULL;
  13. + }
  14. +
  15. private:
  16. HttpClientSession(HttpClientSession &);
  17.  
  18. diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
  19. index c9b1322..5204a31 100644
  20. --- a/proxy/http/HttpSM.cc
  21. +++ b/proxy/http/HttpSM.cc
  22. @@ -6581,6 +6581,10 @@ HttpSM::kill_this()
  23. // Not keep alive, go ahead and shut it down
  24. ua_session->do_io_close();
  25. }
  26. + // reset the ua_session's reader (HttpSM) to prevent double free
  27. + // in HttpClientSession::destroy()
  28. + ua_session->release_current_reader();
  29. +
  30. ua_session = NULL;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement