ywkaras commented on a change in pull request #6957:
URL: https://github.com/apache/trafficserver/pull/6957#discussion_r446361637



##########
File path: iocore/net/SSLUtils.cc
##########
@@ -1840,6 +1840,7 @@ SSLAccept(SSL *ssl)
 
       if (ret == SSL_READ_EARLY_DATA_ERROR) {
         Debug("ssl_early_data", "SSL_READ_EARLY_DATA_ERROR");
+        block->free();

Review comment:
       It seems like a common pattern in our code that we call a free() member 
function to deallocate class instances.  Maybe we should add a utility to 
itscore that uses std::unique_ptr to call free().  https://godbolt.org/z/G-g7CH 
It would help avoid accidental leaks like this in future code.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to