efl: more valgrind related fixes on eina_cow
authorBoris Faure <billiob@gmail.com>
Thu, 24 Jan 2013 21:42:18 +0000 (21:42 +0000)
committerBoris Faure <billiob@gmail.com>
Thu, 24 Jan 2013 21:42:18 +0000 (21:42 +0000)
SVN revision: 83311

src/lib/eina/eina_cow.c

index e3ef6d8..d7f9879 100644 (file)
@@ -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