cmcfarlen commented on code in PR #12333:
URL: https://github.com/apache/trafficserver/pull/12333#discussion_r2190428416


##########
plugins/stats_over_http/stats_over_http.cc:
##########
@@ -726,9 +743,8 @@ stats_origin(TSCont contp, TSEvent /* event ATS_UNUSED */, 
void *edata)
   /* This is us -- register our intercept */
   Dbg(dbg_ctl, "Intercepting request");
 
-  my_state = (stats_state *)TSmalloc(sizeof(*my_state));
-  memset(my_state, 0, sizeof(*my_state));
-  icontp = TSContCreate(stats_dostuff, TSMutexCreate());
+  my_state = new stats_state;

Review Comment:
   You switched this to use `new`, but the cleanup of this still uses `TSfree` 
instead of `delete` (in `stats_cleanup`)



-- 
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.

To unsubscribe, e-mail: github-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to