Github user zwoop commented on the pull request:

    https://github.com/apache/trafficserver/pull/361#issuecomment-162083854
  
    Yeah, so there's no leak here (sorry, my bad), but I feel these checks are 
unnecessary. I'd rather change this to have a release assert above this, e.g.
    
        --- a/plugins/experimental/cache_promote/cache_promote.cc
        +++ b/plugins/experimental/cache_promote/cache_promote.cc
        @@ -249,6 +249,7 @@ public:
             map_it = _map.find(&hash);
             if (_map.end() != map_it) {
               // We have an entry in the LRU
        +      TSReleaseAssert(_list.size() > 0); // mismatch in the LRUs hash 
and list
               if (++(map_it->second->second) >= _hits) {
                 // Promoted! Cleanup the LRU, and signal success. Save the 
promoted entry on the freelist.
                TSDebug(PLUGIN_NAME, "saving the LRUEntry to the freelist");



---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to