We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0780b08 commit d713a5dCopy full SHA for d713a5d
1 file changed
src/flb_gzip.c
@@ -1007,9 +1007,20 @@ void *flb_gzip_decompression_context_create()
1007
1008
void flb_gzip_decompression_context_destroy(void *context)
1009
{
1010
- if (context != NULL) {
1011
- flb_free(context);
+ struct flb_gzip_decompression_context *inner_context;
+
1012
+ if (context == NULL) {
1013
+ return;
1014
+ }
1015
1016
+ inner_context = (struct flb_gzip_decompression_context *) context;
1017
1018
+ if (inner_context->miniz_stream.state != NULL) {
1019
+ mz_inflateEnd(&inner_context->miniz_stream);
1020
+ memset(&inner_context->miniz_stream, 0, sizeof(mz_stream));
1021
}
1022
1023
+ flb_free(inner_context);
1024
1025
1026
int flb_is_http_session_gzip_compressed(struct mk_http_session *session)
0 commit comments