perl: unlock mutex on error
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 17:06:33 +0000 (18:06 +0100)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sun, 29 Nov 2015 17:06:33 +0000 (18:06 +0100)
CID 37970

src/perl.c

index 0a98684..cf09586 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);