diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-05 22:07:10 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-05 22:07:10 -0800 |
commit | 806ba1c80d86bd59759cf59efc057662eecbcf65 (patch) | |
tree | d30146be1313d6be6818cb1c613fc4ea26b9a7d1 /core/upb_string.c | |
parent | 3affb319260263efc3cee502896d9f981186c7da (diff) |
Another round of fixes.
test_vs_proto2.googlemessage1 passes again,
with no memory leaks!
Diffstat (limited to 'core/upb_string.c')
-rw-r--r-- | core/upb_string.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 { |