summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-04-19 20:09:03 +0200
committerLennart Poettering <lennart@poettering.net>2009-04-19 20:09:03 +0200
commit8fbf6269b340dd5c920bf90c8dc5f0da4bc062f3 (patch)
tree73917fe20183c93a05935996912115eba5e1e268
parenteb04d0fda6f6ee7998bcf290750a299c566fbb19 (diff)
object: revert to old unref() behaviour
This mostly reverts these two commits: eb04d0fda6f6ee7998bcf290750a299c566fbb19 12c5afe0382ded41de5283e0a8711155adf7ee64
-rw-r--r--src/pulsecore/object.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pulsecore/object.c b/src/pulsecore/object.c
index a4bb14f1..f3ead9c5 100644
--- a/src/pulsecore/object.c
+++ b/src/pulsecore/object.c
@@ -59,10 +59,9 @@ pa_object *pa_object_ref(pa_object *o) {
void pa_object_unref(pa_object *o) {
pa_object_assert_ref(o);
- if (PA_REFCNT_VALUE(o) == 1) {
+ if (PA_REFCNT_DEC(o) <= 0) {
pa_assert(o->free);
o->free(o);
- pa_assert_se(PA_REFCNT_DEC(o) == 0);
}
}