Code

Merge pull request #1386 from rubenk/rrdtool-unlock-on-error
[collectd.git] / src / perl.c
index 0a98684e9e809f30be3eb042abe3a254bb028510..cf09586f71abceeb644cc1fd8d9083867fd6da82 100644 (file)
@@ -1199,7 +1199,10 @@ static void c_ithread_destructor (void *arg)
 
        /* the ithread no longer exists */
        if (NULL == t)
+       {
+               pthread_mutex_unlock (&perl_threads->mutex);
                return;
+       }
 
        c_ithread_destroy (ithread);