projects
/
folly.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix use-after-free in addFunctionOnce
[folly.git]
/
folly
/
experimental
/
FunctionScheduler.cpp
diff --git
a/folly/experimental/FunctionScheduler.cpp
b/folly/experimental/FunctionScheduler.cpp
index 6dfb2c2c76f0b9a53c536f749020b8377652336e..83fba55b1627cfdfc48da881cb929f90b0ab1a68 100644
(file)
--- a/
folly/experimental/FunctionScheduler.cpp
+++ b/
folly/experimental/FunctionScheduler.cpp
@@
-445,6
+445,7
@@
void FunctionScheduler::runOneFunction(std::unique_lock<std::mutex>& lock,
}
if (currentFunction_->runOnce) {
// Don't reschedule if the function only needed to run once.
+ currentFunction_ = nullptr;
return;
}
// Clear currentFunction_