Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-daemon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-daemon
Commits
f6639290
Commit
f6639290
authored
2 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
scheduled_executor: prevent use-after-free in reschedule
Change-Id: I449e8fa5afe064cc17d834722f0d870be711d32c
parent
90c99062
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheduled_executor.cpp
+5
-3
5 additions, 3 deletions
src/scheduled_executor.cpp
with
5 additions
and
3 deletions
src/scheduled_executor.cpp
+
5
−
3
View file @
f6639290
...
...
@@ -101,10 +101,12 @@ ScheduledExecutor::scheduleAtFixedRate(std::function<bool()>&& job,
void
ScheduledExecutor
::
reschedule
(
std
::
shared_ptr
<
RepeatedTask
>
task
,
time_point
t
,
duration
dt
)
{
const
char
*
filename
=
task
->
job
().
filename
;
uint32_t
linenum
=
task
->
job
().
linum
;
schedule
(
std
::
make_shared
<
Task
>
([
this
,
task
=
std
::
move
(
task
),
t
,
dt
]()
mutable
{
if
(
task
->
run
(
name_
.
c_str
()))
reschedule
(
std
::
move
(
task
),
t
+
dt
,
dt
);
},
task
->
job
().
filename
,
task
->
job
().
li
num
),
},
filename
,
line
num
),
t
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment