From: jenny <84835889+jenny-cheung@users.noreply.github.com> Date: Mon, 23 Aug 2021 09:22:43 +0000 (+0800) Subject: Fix a small error due to the unreleased lock X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F3903%2Fhead;p=thirdparty%2Fcollectd.git Fix a small error due to the unreleased lock Fix a small error due to the unreleased lock by add pthread_mutex_unlock(&perl_threads->mutex) before program exit. --- diff --git a/src/perl.c b/src/perl.c index 0a4ae71d1..4c7c6912e 100644 --- a/src/perl.c +++ b/src/perl.c @@ -2444,6 +2444,7 @@ static int init_pi(int argc, char **argv) { if (NULL == (perl_threads->head->interp = perl_alloc())) { log_err("init_pi: Not enough memory."); + pthread_mutex_unlock(&perl_threads->mutex); exit(3); }