X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fperl.c;h=14a7a8dfd9d5c350fb9fe1f27b09961fdb1668ba;hb=4bca6c6b7e03ab4aa0d6a8a59dda3e44608f63f1;hp=0a98684e9e809f30be3eb042abe3a254bb028510;hpb=20d15cfd26b23508242abcead906207bf26175d0;p=collectd.git diff --git a/src/perl.c b/src/perl.c index 0a98684e..14a7a8df 100644 --- a/src/perl.c +++ b/src/perl.c @@ -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); @@ -1640,15 +1643,15 @@ static XS (Collectd_plugin_dispatch_values) values = ST (/* stack index = */ 0); + if (NULL == values) + XSRETURN_EMPTY; + /* Make sure the argument is a hash reference. */ if (! (SvROK (values) && (SVt_PVHV == SvTYPE (SvRV (values))))) { log_err ("Collectd::plugin_dispatch_values: Invalid values."); XSRETURN_EMPTY; } - if (NULL == values) - XSRETURN_EMPTY; - ret = pplugin_dispatch_values (aTHX_ (HV *)SvRV (values)); if (0 == ret)