You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2015/02/05 00:10:08 UTC
trafficserver git commit: TS-3287: Fix memory leak in CLFUS ram cache
Repository: trafficserver
Updated Branches:
refs/heads/master 0509bf64c -> e1ec0dac4
TS-3287: Fix memory leak in CLFUS ram cache
Coverity CID #1021839
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e1ec0dac
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e1ec0dac
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e1ec0dac
Branch: refs/heads/master
Commit: e1ec0dac46549e823107dd896fc1c4483f86b549
Parents: 0509bf6
Author: Phil Sorber <so...@apache.org>
Authored: Wed Feb 4 16:07:45 2015 -0700
Committer: Phil Sorber <so...@apache.org>
Committed: Wed Feb 4 16:09:58 2015 -0700
----------------------------------------------------------------------
iocore/cache/RamCacheCLFUS.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e1ec0dac/iocore/cache/RamCacheCLFUS.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 8130255..a1bfd79 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -424,6 +424,8 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
MUTEX_TAKE_LOCK(vol->mutex, thread);
// see if the entry is till around
{
+ if (failed)
+ goto Lfailed;
uint32_t i = key.slice32(3) % nbuckets;
RamCacheCLFUSEntry *ee = bucket[i].head;
while (ee) {
@@ -434,8 +436,6 @@ RamCacheCLFUS::compress_entries(EThread *thread, int do_at_most)
e = compressed;
goto Lcontinue;
}
- if (failed)
- goto Lfailed;
}
if (l > REQUIRED_COMPRESSION * e->len)
e->flag_bits.incompressible = true;