Close #77 修正http_half_private结构体未完全释放的问题

This commit is contained in:
Lu Qiuwen
2018-11-14 15:55:51 +08:00
parent ff5cc198a2
commit 6bcd2cb9a6
4 changed files with 67 additions and 2 deletions

View File

@@ -27,6 +27,7 @@ void hf_content_uncompress_destroy(struct hf_content_uncompress * cv_object)
{
(void) inflateEnd(cv_object->z_stream_ptr);
free(cv_object->z_stream_ptr);
free(cv_object->chunk);
cv_object->z_stream_ptr = NULL;
free(cv_object);
}
@@ -196,5 +197,8 @@ int hf_content_compress_write(struct hf_content_compress * cv_object,
void hf_content_compress_destroy(hf_content_compress * cv_object)
{
return;
(void) deflateEnd(cv_object->z_stream_ptr);
free(cv_object->z_stream_ptr);
cv_object->z_stream_ptr = NULL;
free(cv_object);
}