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
a741d530
Commit
a741d530
authored
Jan 10, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed leak for server creation/destroy
parent
9ea7b6f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
test.pl
build/test/test.pl
+1
-2
mongoose.c
mongoose.c
+5
-0
No files found.
build/test/test.pl
View file @
a741d530
...
...
@@ -361,8 +361,7 @@ unless (scalar(@ARGV) > 0 and $ARGV[0] eq "basic_tests") {
o
(
"GET /dir%20with%20spaces/hello.cgi HTTP/1.0\n\r\n"
,
'HTTP/1.1 200 OK.+hello'
,
'CGI script with spaces in path'
);
o
(
"GET /env.cgi HTTP/1.0\n\r\n"
,
'HTTP/1.1 200 OK'
,
'GET CGI file'
);
o
(
"GET /bad2.cgi HTTP/1.0\n\n"
,
"HTTP/1.1 302 Please pass me to the client\r"
,
'CGI Status code text'
);
o
(
"GET /bad2.cgi HTTP/1.0\n\n"
,
"^HTTP/1.1 302"
,
'CGI Status code'
);
o
(
"GET /sh.cgi HTTP/1.0\n\r\n"
,
'shell script CGI'
,
'GET sh CGI file'
)
unless
on_windows
();
o
(
"GET /env.cgi?var=HELLO HTTP/1.0\n\n"
,
'QUERY_STRING=var=HELLO'
,
...
...
mongoose.c
View file @
a741d530
...
...
@@ -3532,6 +3532,7 @@ unsigned int mg_poll_server(struct mg_server *server, int milliseconds) {
}
void
mg_destroy_server
(
struct
mg_server
**
server
)
{
int
i
;
struct
ll
*
lp
,
*
tmp
;
if
(
server
!=
NULL
&&
*
server
!=
NULL
)
{
...
...
@@ -3542,8 +3543,12 @@ void mg_destroy_server(struct mg_server **server) {
free
(
LINKED_LIST_ENTRY
(
lp
,
struct
connection
,
link
));
}
LINKED_LIST_FOREACH
(
&
(
*
server
)
->
uri_handlers
,
lp
,
tmp
)
{
free
(
LINKED_LIST_ENTRY
(
lp
,
struct
uri_handler
,
link
)
->
uri
);
free
(
LINKED_LIST_ENTRY
(
lp
,
struct
uri_handler
,
link
));
}
for
(
i
=
0
;
i
<
(
int
)
ARRAY_SIZE
((
*
server
)
->
config_options
);
i
++
)
{
free
((
*
server
)
->
config_options
[
i
]);
// It is OK to free(NULL)
}
#ifdef USE_SSL
if
((
*
server
)
->
ssl_ctx
!=
NULL
)
SSL_CTX_free
((
*
server
)
->
ssl_ctx
);
#endif
...
...
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