mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Fix memory leak in streams
This commit is contained in:
parent
03ec81d86f
commit
bc8662b0d5
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
||||
DD mmm YYYY - 2.9.x (to be released)
|
||||
-------------------
|
||||
|
||||
* Fix memory leak in streams
|
||||
[Issue #2208 - @marcstern, @vloup, @JamesColeman-LW]
|
||||
* mlogc log-line parsing fails due to enhanced timestamp
|
||||
[Issue #2682 - @bozhinov, @ABrauer-CPT, @martinhsv]
|
||||
* Allow no-key, single-value JSON body
|
||||
|
@ -325,6 +325,21 @@ static apr_status_t modsecurity_tx_cleanup(void *data) {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Streams cleanup. */
|
||||
if (msr->stream_input_data != NULL) {
|
||||
free(msr->stream_input_data);
|
||||
msr->stream_input_data = NULL;
|
||||
msr->stream_input_length = 0;
|
||||
#ifdef MSC_LARGE_STREAM_INPUT
|
||||
msr->stream_input_allocated_length = 0;
|
||||
#endif
|
||||
}
|
||||
if (msr->stream_output_data != NULL) {
|
||||
free(msr->stream_output_data);
|
||||
msr->stream_output_data = NULL;
|
||||
msr->stream_output_length = 0;
|
||||
}
|
||||
|
||||
return APR_SUCCESS;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user