Commit 0c7d2630 0c7d2630eb50fe1556c063a8c4249647db5e6941 by Sergey Poznyakoff

(mu_refcount_inc, mu_refcount_dec): Bugfix

1 parent 5f279c91
...@@ -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 }
......