<div dir="ltr">Hi, all:<div><br></div><div>nginx code version: 1.7.9 ( I have checked v1.9.0, no change about this)</div><div><br></div><div>The bufs used to invoke ngx_event_pipe_remove_shadow_links  in ngx_event_pipe_read_upstream come from p->preread_bufs or p->free_raw_bufs or new allocated buf. </div><div><br></div><div>Both p->preread_bufs and new allocated buf have no shadow link.</div><div><br></div><div>p->preread_bufs is inited to be NULL, and there  are two places which will add free buffer into it: ngx_event_pipe_write_chain_to_temp_file and  ngx_event_pipe_write_to_downstream.</div><div><br></div><div>In both places, shadow links are cleared by ngx_event_pipe_add_free_buf or by ngx_event_pipe_remove_shadow_links.<br></div><div><br></div><div>So, there is no need to call ngx_event_pipe_remove_shadow_links in ngx_event_pipe_read_upstream at all, for shadow link will always be NULL.</div><div><br></div><div>Am I missing something ? Or just lack of code review ?</div><div><br clear="all"><div><br></div>
</div></div>