X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fperl.c;h=3b498f9b7ea348caf5048bc27932ccf3e0deb714;hb=d5565943cd7ee338e5b750a027faff8115df4c72;hp=1ce09f4df19c963849175595096fd6a4d6fb6af4;hpb=0c004681a480e919b779584814eb396f6e6948ca;p=collectd.git diff --git a/src/perl.c b/src/perl.c index 1ce09f4d..3b498f9b 100644 --- a/src/perl.c +++ b/src/perl.c @@ -1208,7 +1208,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); @@ -2515,7 +2518,10 @@ static int perl_config (oconfig_item_t *ci) int current_status = 0; if (NULL != perl_threads) - aTHX = PERL_GET_CONTEXT; + { + if ((aTHX = PERL_GET_CONTEXT) == NULL) + return -1; + } if (0 == strcasecmp (c->key, "LoadPlugin")) current_status = perl_config_loadplugin (aTHX_ c);