| diff -up cyrus-sasl-2.1.23/lib/common.c.race cyrus-sasl-2.1.23/lib/common.c |
| |
| |
| @@ -794,7 +794,11 @@ void sasl_dispose(sasl_conn_t **pconn) |
| if (result!=SASL_OK) return; |
| |
| /* *pconn might have become NULL by now */ |
| - if (! (*pconn)) return; |
| + if (! (*pconn)) |
| + { |
| + sasl_MUTEX_UNLOCK(free_mutex); |
| + return; |
| + } |
| |
| (*pconn)->destroy_conn(*pconn); |
| sasl_FREE(*pconn); |