This is an automated email from the ASF dual-hosted git repository.
bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 1bf13a210c XPACK: Fix a ats_malloc/delete mismatch (#11049)
1bf13a210c is described below
commit 1bf13a210c0a4170390cebf2771dffcec2d3f12a
Author: Brian Neradt <[email protected]>
AuthorDate: Wed Feb 7 13:28:16 2024 -0600
XPACK: Fix a ats_malloc/delete mismatch (#11049)
An ASan run showed that in XpackDynamicTable we used ats_malloc for the
table entries, but then delete it in the destructor. This fixes that
mismatch.
---
src/proxy/hdrs/XPACK.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/proxy/hdrs/XPACK.cc b/src/proxy/hdrs/XPACK.cc
index 8e458cc52d..6cb775c097 100644
--- a/src/proxy/hdrs/XPACK.cc
+++ b/src/proxy/hdrs/XPACK.cc
@@ -225,7 +225,7 @@ XpackDynamicTable::XpackDynamicTable(uint32_t size) :
_maximum_size(size), _avai
XpackDynamicTable::~XpackDynamicTable()
{
if (this->_entries) {
- delete this->_entries;
+ ats_free(this->_entries);
this->_entries = nullptr;
}
}