GitHub user bryongloden opened a pull request:

    https://github.com/apache/trafficserver/pull/854

    fix the memory leaks

    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

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/bryongloden/trafficserver bryongloden-patch-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/854.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #854
    
----
commit 468b46bc6448b43d1e4713e22fcae089f27e85b5
Author: Bryon Gloden, CISSP® <[email protected]>
Date:   2016-08-11T22:22:57Z

    Update test_P_DNS.cc
    
    [iocore/dns/test_P_DNS.cc:74]: (error) Memory leak: str

commit 2841e179725e8be84cea2dc57cb999cff018f131
Author: Bryon Gloden, CISSP® <[email protected]>
Date:   2016-08-11T22:25:14Z

    Update test_P_Net.cc
    
    [iocore/net/test_P_Net.cc:72]: (error) Memory leak: str

commit b186b8ddbad8f0a4bb18c3d6f20ef3939b1cae3a
Author: Bryon Gloden, CISSP® <[email protected]>
Date:   2016-08-11T22:52:26Z

    Update test_P_Net.cc
    
    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

commit 71ea17958896b83cf186c632ed27fae66bfae35e
Author: Bryon Gloden, CISSP® <[email protected]>
Date:   2016-08-11T22:53:31Z

    Update test_P_Net.cc
    
    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

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to