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
96409e74
Commit
96409e74
authored
9 years ago
by
Deomid Ryabkov
Committed by
Marko Mikulicic
9 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ALL the leaks!
PUBLISHED_FROM=0adf7c6c903075d6705693829f8758f8ff67d579
parent
e28ee097
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
mongoose.c
mongoose.c
+4
-1
No files found.
mongoose.c
View file @
96409e74
...
...
@@ -4442,6 +4442,7 @@ static void mg_send_http_file2(struct mg_connection *nc, const char *path,
send_http_error
(
nc
,
500
,
"Server Error"
);
}
else
if
(
mg_match_prefix
(
opts
->
ssi_pattern
,
strlen
(
opts
->
ssi_pattern
),
path
)
>
0
)
{
nc
->
proto_data
=
(
void
*
)
dp
;
handle_ssi_request
(
nc
,
path
,
opts
);
}
else
{
char
etag
[
50
],
current_time
[
50
],
last_modified
[
50
],
range
[
50
];
...
...
@@ -5625,7 +5626,7 @@ static void cgi_ev_handler(struct mg_connection *cgi_nc, int ev,
}
break
;
case
MG_EV_CLOSE
:
free_http_proto_data
(
nc
);
free_http_proto_data
(
cgi_
nc
);
nc
->
flags
|=
MG_F_SEND_AND_CLOSE
;
nc
->
user_data
=
NULL
;
break
;
...
...
@@ -5672,6 +5673,7 @@ static void handle_cgi(struct mg_connection *nc, const char *prog,
dp
->
type
=
DATA_CGI
;
dp
->
cgi_nc
=
mg_add_sock
(
nc
->
mgr
,
fds
[
0
],
cgi_ev_handler
);
dp
->
cgi_nc
->
user_data
=
nc
;
dp
->
cgi_nc
->
proto_data
=
dp
;
nc
->
flags
|=
MG_F_USER_1
;
/* Push POST data to the CGI */
if
(
n
>
0
&&
n
<
nc
->
recv_mbuf
.
len
)
{
...
...
@@ -6756,6 +6758,7 @@ static void mg_mqtt_destroy_session(struct mg_mqtt_session *s) {
for
(
i
=
0
;
i
<
s
->
num_subscriptions
;
i
++
)
{
MG_FREE
((
void
*
)
s
->
subscriptions
[
i
].
topic
);
}
MG_FREE
(
s
->
subscriptions
);
MG_FREE
(
s
);
}
...
...
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