maskit opened a new issue, #10198:
URL: https://github.com/apache/trafficserver/issues/10198
```
432void
433TSPluginInit(int argc, const char *argv[])
434{
1. Condition !atscppapi::RegisterGlobalPlugin("CPP_Example_Boom",
"apache", "[email protected]"), taking false branch.
435 if (!RegisterGlobalPlugin("CPP_Example_Boom", "apache",
"[email protected]")) {
436 return;
437 }
438 boom_counter.init(BOOM_COUNTER);
2. alloc_fn: Storage is returned from allocation function operator new.
3. var_assign: Assigning: pregistry = storage returned from new
BoomResponseRegistry.
439 BoomResponseRegistry *pregistry = new BoomResponseRegistry();
440
441 // If base directory and list of codes are specified,
442 // create a custom registry and initialize Boom with it.
443 // Otherwise, run with default registry.
4. Condition argc == 3, taking true branch.
444 if (argc == 3) {
445 std::string base_directory(argv[1], strlen(argv[1]));
5. noescape: Resource pregistry is not freed or pointed-to in
populate_error_responses. [[show
details](https://scan6.scan.coverity.com/eventId=34625569-5&modelId=34625569-0&fileInstanceId=162997232&filePath=%2Fexample%2Fplugins%2Fcpp-api%2Fboom%2Fboom.cc&fileStart=208&fileEnd=245)]
446 pregistry->populate_error_responses(base_directory);
447
448 std::string error_codes_argument(argv[2], strlen(argv[2]));
449 std::vector<std::string> error_codes;
450 stringSplit(error_codes_argument, ',', error_codes);
6. noescape: Resource pregistry is not freed or pointed-to in
register_error_codes. [[show
details](https://scan6.scan.coverity.com/eventId=34625569-7&modelId=34625569-1&fileInstanceId=162997232&filePath=%2Fexample%2Fplugins%2Fcpp-api%2Fboom%2Fboom.cc&fileStart=194&fileEnd=201)]
451 pregistry->register_error_codes(error_codes);
7. Falling through to end of if statement.
452 } else {
453 TS_ERROR(TAG, "Invalid number of command line arguments, using
compile time defaults.");
454 }
455
8. noescape: Resource pregistry is not freed or pointed-to in
BoomGlobalPlugin. [[show
details](https://scan6.scan.coverity.com/eventId=34625569-11&modelId=34625569-2&fileInstanceId=162997232&filePath=%2Fexample%2Fplugins%2Fcpp-api%2Fboom%2Fboom.cc&fileStart=384&fileEnd=388)]
456 plugin = new BoomGlobalPlugin(pregistry);
CID 1508999 (#1-2 of 2): Resource leak (RESOURCE_LEAK)
9. leaked_storage: Variable pregistry going out of scope leaks the storage
it points to.
457}
```
--
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]