Skip to content
Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
grooverdan committed Nov 9, 2021
1 parent e1eb39a commit 7c30bc3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extra/mariabackup/ds_compress.cc
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7c30bc3

Please sign in to comment.