Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nginx-push-stream-module
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
nginx-push-stream-module
Commits
c9faebd1
Commit
c9faebd1
authored
Mar 18, 2011
by
Wandenberg Peixoto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix order of free memory
parent
6635f1ce
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
ngx_http_push_stream_module_utils.c
src/ngx_http_push_stream_module_utils.c
+8
-5
No files found.
src/ngx_http_push_stream_module_utils.c
View file @
c9faebd1
...
...
@@ -46,8 +46,8 @@ ngx_http_push_stream_convert_buffer_to_msg_on_shared_locked(ngx_buf_t *buf)
msg
->
buf
->
start
=
ngx_slab_alloc_locked
(
shpool
,
len
);
if
(
msg
->
buf
->
start
==
NULL
)
{
ngx_slab_free_locked
(
shpool
,
msg
);
ngx_slab_free_locked
(
shpool
,
msg
->
buf
);
ngx_slab_free_locked
(
shpool
,
msg
);
return
NULL
;
}
...
...
@@ -224,15 +224,18 @@ ngx_http_push_stream_free_memory_of_expired_channels_locked(ngx_rbtree_t *tree,
if
((
ngx_time
()
>
channel
->
expires
)
||
force
)
{
ngx_rbtree_delete
(
tree
,
node
);
// delete the worker-subscriber queue
ngx_queue_t
*
workers_sentinel
=
(
ngx_queue_t
*
)
&
channel
->
workers_with_subscribers
;
ngx_queue_t
*
cur
=
ngx_queue_head
(
workers_sentinel
);
ngx_queue_t
*
next
;
ngx_http_push_stream_pid_queue_t
*
workers_sentinel
,
*
cur
,
*
next
;
workers_sentinel
=
&
channel
->
workers_with_subscribers
;
cur
=
(
ngx_http_push_stream_pid_queue_t
*
)
ngx_queue_next
(
&
workers_sentinel
->
queue
);
while
(
cur
!=
workers_sentinel
)
{
next
=
ngx_queue_next
(
cur
);
next
=
(
ngx_http_push_stream_pid_queue_t
*
)
ngx_queue_next
(
&
cur
->
queue
);
ngx_queue_remove
(
&
cur
->
queue
);
ngx_slab_free_locked
(
shpool
,
cur
);
cur
=
next
;
}
ngx_slab_free_locked
(
shpool
,
node
);
}
}
...
...
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