Skip to content

Commit

Permalink
Fix crash in module tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnSully committed May 11, 2020
1 parent 58752bb commit 3742375
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "deps/depot_tools"]
path = deps/depot_tools
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git
1 change: 1 addition & 0 deletions deps/depot_tools
Submodule depot_tools added at aaf566
4 changes: 2 additions & 2 deletions src/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3742375

Please sign in to comment.