Skip to content

Commit cf9aead

Browse files
authored
Fix ProxyProtocol double destructor call in HttpTransact::State (#12724)
Removes explicit destructor call for pp_info member in HttpTransact::State::destroy(). The explicit destructor call was causing undefined behavior as the ProxyProtocol member will be automatically destroyed when the State object is destroyed. This resulted in a double-free detected by GCC 15 in Fedora 42 builds. The member variable pp_info is a regular class member, not allocated with placement new, so it will be properly destroyed automatically when the State object is destroyed or when the destructor runs.
1 parent 7d8a3a0 commit cf9aead

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

include/proxy/http/HttpTransact.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,8 +889,6 @@ class HttpTransact
889889
ranges = nullptr;
890890
range_setup = RangeSetup_t::NONE;
891891

892-
// This avoids a potential leak since sometimes this class is not destructed (ClassAllocated via HttpSM)
893-
pp_info.~ProxyProtocol();
894892
return;
895893
}
896894

0 commit comments

Comments
 (0)