[ 
https://issues.apache.org/jira/browse/TS-4449?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15347049#comment-15347049
 ] 

ASF GitHub Bot commented on TS-4449:
------------------------------------

Github user jpeach commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/735#discussion_r68301583
  
    --- Diff: plugins/header_rewrite/regex_helper.h ---
    @@ -36,11 +36,13 @@ class regexHelper
       regexHelper() : regex(NULL), regexExtra(NULL), regexCcount(0) {}
       ~regexHelper()
       {
    -    if (regex)
    +    if (regex) {
           pcre_free(regex);
    +    }
     
    -    if (regexExtra)
    +    if (regexExtra) {
           pcre_free(regexExtra);
    +    }
    --- End diff --
    
    FWIW, ``pcre_free`` should have the same semantics as ``free(3)`` so 
passing ``NULL`` is a no-op.


> header_rewrite: Improve TSDebug() statements
> --------------------------------------------
>
>                 Key: TS-4449
>                 URL: https://issues.apache.org/jira/browse/TS-4449
>             Project: Traffic Server
>          Issue Type: Improvement
>          Components: Plugins
>            Reporter: Leif Hedstrom
>            Assignee: Leif Hedstrom
>             Fix For: 7.0.0
>
>
> Right now, it can be difficult at times to understand why header_rewrite 
> isn't behaving as you'd expect. There are a number of places where we can 
> improve TSDebug().
> Also, I'm going to do a code cleanup here, to make the code more inline with 
> our current best practices (e.g. use if () { } consistently).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to