Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
e4a4b6f2
Commit
e4a4b6f2
authored
8 years ago
by
Alexander Alashkin
Committed by
Cesanta Bot
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix coredump in mg_tun_destroy_client
PUBLISHED_FROM=56ff5afe805e4680e02183a8c3887ea60ee5ebfe
parent
0ceee1dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
mongoose.c
mongoose.c
+18
-4
No files found.
mongoose.c
View file @
e4a4b6f2
...
...
@@ -11342,10 +11342,24 @@ static struct mg_tun_client *mg_tun_create_client(struct mg_mgr *mgr,
}
void
mg_tun_destroy_client
(
struct
mg_tun_client
*
client
)
{
/* the dispatcher connection handler will in turn close all tunnels */
client
->
disp
->
flags
|=
MG_F_CLOSE_IMMEDIATELY
;
/* this is used as a signal to other tun handlers that the party is over */
client
->
disp
->
user_data
=
client
->
iface
->
data
=
NULL
;
/*
* NOTE:
* `client` is NULL in case of OOM
* `client->disp` is NULL if connection failed
* `client->iface is NULL is `mg_find_iface` failed
*/
if
(
client
!=
NULL
&&
client
->
disp
!=
NULL
)
{
/* the dispatcher connection handler will in turn close all tunnels */
client
->
disp
->
flags
|=
MG_F_CLOSE_IMMEDIATELY
;
/* this is used as a signal to other tun handlers that the party is over */
client
->
disp
->
user_data
=
NULL
;
}
if
(
client
!=
NULL
&&
client
->
iface
!=
NULL
)
{
client
->
iface
->
data
=
NULL
;
}
MG_FREE
(
client
);
}
...
...
This diff is collapsed.
Click to expand it.
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