Skip to content

Conversation

@bryonglodencissp
Copy link

On line #74 'test_P_DNS.cc' has a memory leak and on line #72 'test_P_Net.cc' has a memory leak -- both of which are errors.

Found by https://github.com/bryongloden/cppcheck

Bryon Gloden, CISSP® added 4 commits August 11, 2016 18:22
[iocore/dns/test_P_DNS.cc:74]: (error) Memory leak: str
[iocore/net/test_P_Net.cc:72]: (error) Memory leak: str
There's no guarantee that delete will work on arrays. In C++ we call this undefined behaviour -- it might work, it might not, it might do something totally random and unexpected. We'd be best to avoid relying on undefined behavior.

REF: http://stackoverflow.com/a/6953502
There's no guarantee that delete will work on arrays. In C++ we call this undefined behaviour -- it might work, it might not, it might do something totally random and unexpected. We'd be best to avoid relying on undefined behavior.

REF: http://stackoverflow.com/a/6953502
@bryonglodencissp
Copy link
Author

Buggy... will submit new PR momentarily

bneradt added a commit to bneradt/trafficserver that referenced this pull request Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant