Fix crash in module tests

Former-commit-id: 37423757b54b2052512dcfeaba72ccbd360d3c1e
This commit is contained in:
John Sully 2020-05-10 21:06:38 -04:00
parent 73f60aca33
commit f76a52b957
3 changed files with 6 additions and 2 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "deps/depot_tools"]
path = deps/depot_tools
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git

1
deps/depot_tools vendored Submodule

@ -0,0 +1 @@
Subproject commit aaf566999558aa8ead38811228cd539a6e6e2fda

View File

@ -4701,13 +4701,14 @@ void moduleHandleBlockedClients(int iel) {
if ((c != nullptr) && (iel != c->iel))
continue;
std::unique_lock<fastlock> ul;
listDelNode(moduleUnblockedClients,ln);
pthread_mutex_unlock(&moduleUnblockedClientsMutex);
if (c)
{
AssertCorrectThread(c);
fastlock_lock(&c->lock);
ul = std::unique_lock<fastlock>(c->lock);
}
/* Release the lock during the loop, as long as we don't
@ -4773,7 +4774,6 @@ void moduleHandleBlockedClients(int iel) {
/* Free 'bc' only after unblocking the client, since it is
* referenced in the client blocking context, and must be valid
* when calling unblockClient(). */
fastlock_unlock(&c->lock);
bc->module->blocked_clients--;
zfree(bc);