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

Bryan Call commented on TS-4778:
--------------------------------

Yes, this is from Coverity.

> CID 1361874:  Null pointer dereferences  (REVERSE_INULL) 
> /mgmt/api/CfgContextManager.cc:
> ----------------------------------------------------------------------------------------
>
>                 Key: TS-4778
>                 URL: https://issues.apache.org/jira/browse/TS-4778
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Management API
>            Reporter: Leif Hedstrom
>            Assignee: Eric Schwartz
>             Fix For: 7.0.0
>
>
> Not sure why this showed up now, but it did...
> {code}
> *** CID 1361874:  Null pointer dereferences  (REVERSE_INULL)
> /mgmt/api/CfgContextManager.cc: 201 in CfgContextGet(CfgContext *)()
> 195           ats_free(old_text); // need to free memory
> 196           return ret;
> 197         }
> 198       }
> 199       delete (rule_list); // free RuleList memory
> 200       // TODO: Hmmm, this looks almost like a memory leak, why the strcmp 
> ??
>    CID 1361874:  Null pointer dereferences  (REVERSE_INULL)
>    Null-checking "old_text" suggests that it may be null, but it has already 
> been dereferenced on all paths leading to the check.
> 201       if (old_text && strcmp(old_text, "") != 0) {
> 202         ats_free(old_text); // need to free memory
> 203       }
> 204       return TS_ERR_OKAY;
> 205     }
> 206     
> {code}



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

Reply via email to