diff --git a/src/perl.c b/src/perl.c
index 67cb842b0b06f0c42332f4ee999e5fd45a91aac1..945e22586c806e2b3000f18c78e201cbbf74fff4 100644 (file)
--- a/src/perl.c
+++ b/src/perl.c
/* the ithread no longer exists */
if (NULL == t)
+ {
+ pthread_mutex_unlock (&perl_threads->mutex);
return;
+ }
c_ithread_destroy (ithread);
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);
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);