From 806ba1c80d86bd59759cf59efc057662eecbcf65 Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sat, 5 Feb 2011 22:07:10 -0800 Subject: Another round of fixes. test_vs_proto2.googlemessage1 passes again, with no memory leaks! --- core/upb_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/upb_string.c') diff --git a/core/upb_string.c b/core/upb_string.c index bc5b772..297583b 100644 --- a/core/upb_string.c +++ b/core/upb_string.c @@ -63,7 +63,7 @@ void _upb_string_free(upb_string *str) { void upb_string_recycle(upb_string **_str) { upb_string *str = *_str; - if(str && upb_atomic_read(&str->refcount) == 1) { + if(str && upb_atomic_only(&str->refcount)) { str->ptr = NULL; upb_string_release(str); } else { -- cgit v1.2.3