MEDIUM: compression: use pool for comp_ctx
Use pool for comp_ctx, it is allocated during the comp_algo->init().
The allocation of comp_ctx is accounted for in the zlib_memory_available.
diff --git a/include/types/compression.h b/include/types/compression.h
index cf56e45..e4b1f27 100644
--- a/include/types/compression.h
+++ b/include/types/compression.h
@@ -50,11 +50,11 @@
struct comp_algo {
char *name;
int name_len;
- int (*init)(struct comp_ctx *comp_ctx, int level);
+ int (*init)(struct comp_ctx **comp_ctx, int level);
int (*add_data)(struct comp_ctx *comp_ctx, const char *in_data, int in_len, struct buffer *out);
int (*flush)(struct comp_ctx *comp_ctx, struct buffer *out, int flag);
int (*reset)(struct comp_ctx *comp_ctx);
- int (*end)(struct comp_ctx *comp_ctx);
+ int (*end)(struct comp_ctx **comp_ctx);
struct comp_algo *next;
};