Prevent use after free
Former-commit-id: 81573de393eef083d2209117b270d088a7b3f819
This commit is contained in:
parent
69f375c45b
commit
51ef4343c4
@ -4025,8 +4025,8 @@ bool client::postFunction(std::function<void(client *)> fn, bool fLock) {
|
|||||||
this->casyncOpsPending++;
|
this->casyncOpsPending++;
|
||||||
return aePostFunction(g_pserver->rgthreadvar[this->iel].el, [this, fn]{
|
return aePostFunction(g_pserver->rgthreadvar[this->iel].el, [this, fn]{
|
||||||
std::lock_guard<decltype(this->lock)> lock(this->lock);
|
std::lock_guard<decltype(this->lock)> lock(this->lock);
|
||||||
--casyncOpsPending;
|
|
||||||
fn(this);
|
fn(this);
|
||||||
|
--casyncOpsPending;
|
||||||
}, false, fLock) == AE_OK;
|
}, false, fLock) == AE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user