(mu_refcount_inc, mu_refcount_dec): Bugfix
Showing
1 changed file
with
2 additions
and
2 deletions
... | @@ -87,7 +87,7 @@ mu_refcount_inc (mu_refcount_t refcount) | ... | @@ -87,7 +87,7 @@ mu_refcount_inc (mu_refcount_t refcount) |
87 | { | 87 | { |
88 | mu_monitor_wrlock (refcount->lock); | 88 | mu_monitor_wrlock (refcount->lock); |
89 | count = ++refcount->ref; | 89 | count = ++refcount->ref; |
90 | mu_monitor_wrlock (refcount->lock); | 90 | mu_monitor_unlock (refcount->lock); |
91 | } | 91 | } |
92 | return count; | 92 | return count; |
93 | } | 93 | } |
... | @@ -101,7 +101,7 @@ mu_refcount_dec (mu_refcount_t refcount) | ... | @@ -101,7 +101,7 @@ mu_refcount_dec (mu_refcount_t refcount) |
101 | mu_monitor_wrlock (refcount->lock); | 101 | mu_monitor_wrlock (refcount->lock); |
102 | if (refcount->ref) | 102 | if (refcount->ref) |
103 | count = --refcount->ref; | 103 | count = --refcount->ref; |
104 | mu_monitor_wrlock (refcount->lock); | 104 | mu_monitor_unlock (refcount->lock); |
105 | } | 105 | } |
106 | return count; | 106 | return count; |
107 | } | 107 | } | ... | ... |
-
Please register or sign in to post a comment