Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
44bf62ad
Commit
44bf62ad
authored
Sep 28, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix heap-use-after-free in brokers, close #344
parent
698e7134
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
libcaf_io/caf/io/broker_servant.hpp
libcaf_io/caf/io/broker_servant.hpp
+3
-1
libcaf_io/src/manager.cpp
libcaf_io/src/manager.cpp
+1
-2
No files found.
libcaf_io/caf/io/broker_servant.hpp
View file @
44bf62ad
...
...
@@ -43,7 +43,9 @@ public:
protected:
void
detach_from_parent
()
override
{
this
->
parent
()
->
erase
(
hdl_
);
auto
ptr
=
this
->
parent
();
this
->
set_parent
(
nullptr
);
ptr
->
erase
(
hdl_
);
}
void
invoke_mailbox_element
()
{
...
...
libcaf_io/src/manager.cpp
View file @
44bf62ad
...
...
@@ -44,13 +44,12 @@ void manager::detach(bool invoke_disconnect_message) {
CAF_LOG_TRACE
(
""
);
if
(
!
detached
())
{
CAF_LOG_DEBUG
(
"disconnect servant from broker"
);
detach_from_parent
();
if
(
invoke_disconnect_message
)
{
auto
ptr
=
mailbox_element
::
make
(
invalid_actor_addr
,
invalid_message_id
,
detach_message
());
parent_
->
exec_single_event
(
ptr
);
}
parent_
=
nullptr
;
detach_from_parent
()
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment