bneradt commented on code in PR #12465:
URL: https://github.com/apache/trafficserver/pull/12465#discussion_r2298790165


##########
src/tsutil/Regex.cc:
##########
@@ -152,8 +151,18 @@ RegexMatches::malloc(size_t size, void *caller)
     return ptr;
   }
 
-  // return nullptr if buffer is too small
-  return nullptr;
+  return ::malloc(size);

Review Comment:
   We don't generally check for null on malloc - things will be so obviously 
bad that it's not worth cluttering the code with it.



-- 
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: [email protected]

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

Reply via email to