#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)
|
||||
{
|
||||
if (cv_object->brenc_state) {
|
||||
BrotliEncoderDestroyInstance(cv_object->brenc_state);
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user