maskit opened a new issue, #10435:
URL: https://github.com/apache/trafficserver/issues/10435

   stream_editor.cc
   ```
   848  while (--argc) {
        3. alloc_arg: read_conf allocates memory that is stored into 
rewrites_in. [[show 
details](https://scan6.scan.coverity.com/eventId=34751447-3&modelId=34751447-0&fileInstanceId=164786328&filePath=%2Fplugins%2Fexperimental%2Fstream_editor%2Fstream_editor.cc&fileStart=801&fileEnd=828)]
    849    read_conf(*++argv, rewrites_in, rewrites_out);
        4. Jumping back to the beginning of the loop.
        6. Jumping back to the beginning of the loop.
    850  }
    851
        8. Condition rewrites_in != NULL, taking true branch.
    852  if (rewrites_in != nullptr) {
    853    TSDebug("[stream-editor]", "initializing input filtering");
    854    inputcont = TSContCreate(streamedit_setup, nullptr);
        9. Condition inputcont == NULL, taking true branch.
    855    if (inputcont == nullptr) {
    856      TSError("[stream-editor] failed to initialize input filtering!");
        10. Falling through to end of if statement.
    857    } else {
    858      TSContDataSet(inputcont, rewrites_in);
    859      TSHttpHookAdd(TS_HTTP_READ_REQUEST_HDR_HOOK, inputcont);
    860    }
        11. Falling through to end of if statement.
    861  } else {
    862    TSDebug("[stream-editor]", "no input filter rules, skipping filter");
    863  }
    864
        12. Condition rewrites_out != NULL, taking true branch.
    865  if (rewrites_out != nullptr) {
    866    TSDebug("[stream-editor]", "initializing output filtering");
    867    outputcont = TSContCreate(streamedit_setup, nullptr);
        13. Condition outputcont == NULL, taking true branch.
    868    if (outputcont == nullptr) {
    869      TSError("[stream-editor] failed to initialize output filtering!");
        14. Falling through to end of if statement.
    870    } else {
    871      TSContDataSet(outputcont, rewrites_out);
    872      TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, outputcont);
    873    }
        15. Falling through to end of if statement.
    874  } else {
    875    TSDebug("[stream-editor]", "no output filter rules, skipping 
filter");
    876  }
                CID 1508884: Resource leak (RESOURCE_LEAK) [[select 
issue](https://scan6.scan.coverity.com/defectInstanceId=34751346&fileInstanceId=163647754&mergedDefectId=1508884)]
        
   CID 1508843 (#1 of 1): Resource leak (RESOURCE_LEAK)
   16. leaked_storage: Variable rewrites_in going out of scope leaks the 
storage it points to.
    877}
   ```


-- 
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: issues-unsubscr...@trafficserver.apache.org.apache.org

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

Reply via email to