summaryrefslogtreecommitdiff
path: root/o3tl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-09-01 09:17:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-09-01 09:40:21 +0100
commit5b8e4f3d676eb0a026ce1eb4c1df2ec6e0736cb1 (patch)
tree6dcd43c6fb98231703e4bd1cbb21458dd6fdd496 /o3tl
parentcefbbd5c325b57688c3b43883a6ad9c3e6809815 (diff)
coverity#1321598 Resource leak in object
and coverity#1321597 Resource leak in object Change-Id: I6e9e517a394bea60c1f0550b17bacd653eee5cbc
Diffstat (limited to 'o3tl')
-rw-r--r--o3tl/qa/cow_wrapper_clients.hxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/o3tl/qa/cow_wrapper_clients.hxx b/o3tl/qa/cow_wrapper_clients.hxx
index 8ca04f8d69ae..f5d4de6fda8b 100644
--- a/o3tl/qa/cow_wrapper_clients.hxx
+++ b/o3tl/qa/cow_wrapper_clients.hxx
@@ -162,16 +162,15 @@ struct BogusRefCountPolicy
{
--rCount;
--s_nEndOfScope;
- return true;
}
- if(s_bShouldDecrement)
+ else if(s_bShouldDecrement)
{
--rCount;
s_bShouldDecrement = false;
}
else
CPPUNIT_FAIL("Ref-counting policy decremented when it should not have.");
- return true;
+ return rCount != 0;
}
};