summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2021-10-27 09:42:45 +1100
committerDaniel Black <daniel@mariadb.org>2021-11-09 17:05:55 +1100
commit7c30bc38a588b22b01f11130cfe99e7f36accf94 (patch)
treed62c4e09d41dd2e01f9604335a8d6ad1a427a384
parente1eb39a446c30b8459c39fd7f2ee1c55a36e97d2 (diff)
downloadmariadb-git-7c30bc38a588b22b01f11130cfe99e7f36accf94.tar.gz
MDEV-26561 mariabackup release locks
The previous threads locked need to be released too. This occurs if the initialization of any of the non-first mutex/conditition variables errors occurs.
-rw-r--r--extra/mariabackup/ds_compress.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/extra/mariabackup/ds_compress.cc b/extra/mariabackup/ds_compress.cc
index 72c93879947..a85523bd880 100644
--- a/extra/mariabackup/ds_compress.cc
+++ b/extra/mariabackup/ds_compress.cc
@@ -386,6 +386,13 @@ create_worker_threads(uint n)
return threads;
err:
+ while (i > 0) {
+ comp_thread_ctxt_t *thd;
+ i--;
+ thd = threads + i;
+ pthread_mutex_unlock(&thd->ctrl_mutex);
+ }
+
my_free(threads);
return NULL;
}