Leif Hedstrom created TS-4778:
---------------------------------
Summary: 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
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)