From 5b8e4f3d676eb0a026ce1eb4c1df2ec6e0736cb1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 1 Sep 2015 09:17:53 +0100 Subject: coverity#1321598 Resource leak in object and coverity#1321597 Resource leak in object Change-Id: I6e9e517a394bea60c1f0550b17bacd653eee5cbc --- o3tl/qa/cow_wrapper_clients.hxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'o3tl') 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; } }; -- cgit