X-Git-Url: https://git.octo.it/?a=blobdiff_plain;ds=sidebyside;f=src%2Fperl.c;h=c25bfe897870a8a83457c1c60e91b59c6767aa3e;hb=124f321bbbf0d27fe2b3e5bcb53773fc1686e133;hp=14a7a8dfd9d5c350fb9fe1f27b09961fdb1668ba;hpb=40aabf444e124f40603021821e98bcc40c4aaa0e;p=collectd.git diff --git a/src/perl.c b/src/perl.c index 14a7a8df..c25bfe89 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2076,7 +2076,7 @@ static int perl_shutdown (void) return 0; if (NULL == aTHX) { - c_ithread_t *t = NULL; + t = NULL; pthread_mutex_lock (&perl_threads->mutex); t = c_ithread_create (perl_threads->head->interp); @@ -2509,7 +2509,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);