#175 http compress destroy mem leak
This commit is contained in:
@@ -392,8 +392,15 @@ int hf_content_compress_write(struct hf_content_compress * cv_object,
|
|||||||
|
|
||||||
void hf_content_compress_destroy(hf_content_compress * cv_object)
|
void hf_content_compress_destroy(hf_content_compress * cv_object)
|
||||||
{
|
{
|
||||||
(void) deflateEnd(cv_object->z_stream_ptr);
|
if (cv_object->brenc_state) {
|
||||||
free(cv_object->z_stream_ptr);
|
BrotliEncoderDestroyInstance(cv_object->brenc_state);
|
||||||
cv_object->z_stream_ptr = NULL;
|
cv_object->brenc_state = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cv_object->z_stream_ptr) {
|
||||||
|
(void) deflateEnd(cv_object->z_stream_ptr);
|
||||||
|
free(cv_object->z_stream_ptr);
|
||||||
|
cv_object->z_stream_ptr = NULL;
|
||||||
|
}
|
||||||
free(cv_object);
|
free(cv_object);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user