mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
fix free function because of double free
This commit is contained in:
parent
117cc13525
commit
3c5eae03bd
@ -128,13 +128,14 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
|
||||
if (msr->txcfg->debuglog_level >= 4) {
|
||||
msr_log(msr, 4, "Input stream filter: Forwarded %" APR_SIZE_T_FMT " bytes.", msr->msc_reqbody_disk_chunk->length);
|
||||
}
|
||||
}
|
||||
|
||||
if(msr->txcfg->stream_inbody_inspection && msr->stream_input_data != NULL) {
|
||||
free(msr->stream_input_data);
|
||||
msr->stream_input_data = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (rc == 0) {
|
||||
modsecurity_request_body_retrieve_end(msr);
|
||||
|
||||
@ -477,12 +478,13 @@ static void inject_content_to_of_brigade(modsec_rec *msr, ap_filter_t *f) {
|
||||
if (msr->txcfg->debuglog_level >= 9) {
|
||||
msr_log(msr, 9, "Content Injection: Data reinjected bytes [%d]",msr->stream_output_length);
|
||||
}
|
||||
}
|
||||
|
||||
if(msr->stream_output_data != NULL) {
|
||||
free(msr->stream_output_data);
|
||||
msr->stream_output_data = NULL;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user