From: Boris Faure Date: Thu, 24 Jan 2013 21:42:18 +0000 (+0000) Subject: efl: more valgrind related fixes on eina_cow X-Git-Tag: submit/devel/efl/20131022.203902~1998 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb3c280a95c6b8fb46ce1123835d29429acdb8de;p=platform%2Fupstream%2Fefl.git efl: more valgrind related fixes on eina_cow SVN revision: 83311 --- diff --git a/src/lib/eina/eina_cow.c b/src/lib/eina/eina_cow.c index e3ef6d8..d7f9879 100644 --- a/src/lib/eina/eina_cow.c +++ b/src/lib/eina/eina_cow.c @@ -341,12 +341,12 @@ eina_cow_free(Eina_Cow *cow, const Eina_Cow_Data *data) VALGRIND_MAKE_MEM_DEFINED(ref, sizeof (ref)); #endif ref->refcount--; + + if (ref->refcount > 0) return ; #ifndef NVALGRIND VALGRIND_MAKE_MEM_NOACCESS(ref, sizeof (ref)); #endif - if (ref->refcount > 0) return ; - #ifndef NVALGRIND VALGRIND_MAKE_MEM_DEFINED(ref, sizeof (ref)); #endif