]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
Fix a small error due to the unreleased lock 3903/head
authorjenny <84835889+jenny-cheung@users.noreply.github.com>
Mon, 23 Aug 2021 09:22:43 +0000 (17:22 +0800)
committerGitHub <noreply@github.com>
Mon, 23 Aug 2021 09:22:43 +0000 (17:22 +0800)
Fix a small error due to the unreleased lock by add pthread_mutex_unlock(&perl_threads->mutex) before program exit.

src/perl.c

index 0a4ae71d13ce0f0643a8e805d67854cb4835684a..4c7c6912e8087288e6b96ab8de536750a1746f07 100644 (file)
@@ -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);
   }