httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glenn <>
Subject misuse of apr_brigade_destroy()?
Date Sat, 22 Nov 2003 18:39:13 GMT
I noticed that in modules/filters/mod_ext_filter.c (ef_output_filter())
and in modules/http/http_protocol.c (ap_http_header_filter()) that
apr_brigade_destroy() is performed on brigades that are passed in as

Shouldn't apr_brigade_destroy() only be used on brigades that a
routine creates itself and does not pass?

Isn't it a bad thing to destroy a brigade that was passed to you?
Should the filters mentioned above use apr_brigade_cleanup() instead?
e.g. what happens if a handler uses ap_brigade_pass() to pass a brigade
to a filter, say mod_ext_filter, and then calls apr_brigade_cleanup()
and reuses the brigade?  The brigade will already have been destroyed
by mod_ext_filter, won't it?


View raw message