diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-05-14 14:36:39 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2022-05-14 14:37:02 +0300 |
commit | a13647d1d0418d612010e8ceb6fe560ffaffcf2d (patch) | |
tree | 79526b4486e76b9589e2e504b669290064e0d833 /src/examples/http_compression.c | |
parent | f50b6be7a6088dbff621613bfec82d6fef62dca3 (diff) | |
download | libmicrohttpd-a13647d1d0418d612010e8ceb6fe560ffaffcf2d.tar.gz libmicrohttpd-a13647d1d0418d612010e8ceb6fe560ffaffcf2d.zip |
Replaced MHD_RESPMEM_MUST_FREE with more portable solution in examples
Diffstat (limited to 'src/examples/http_compression.c')
-rw-r--r-- | src/examples/http_compression.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/examples/http_compression.c b/src/examples/http_compression.c index a91a39a3..0f532cf0 100644 --- a/src/examples/http_compression.c +++ b/src/examples/http_compression.c | |||
@@ -130,9 +130,11 @@ ahc_echo (void *cls, | |||
130 | can_compress (connection)) | 130 | can_compress (connection)) |
131 | comp = body_compress ((void **) &body_str, | 131 | comp = body_compress ((void **) &body_str, |
132 | &body_len); | 132 | &body_len); |
133 | response = MHD_create_response_from_buffer (body_len, | 133 | response = |
134 | body_str, | 134 | MHD_create_response_from_buffer_with_free_callback (body_len, |
135 | MHD_RESPMEM_MUST_FREE); | 135 | body_str, |
136 | &free); | ||
137 | |||
136 | if (NULL == response) | 138 | if (NULL == response) |
137 | { | 139 | { |
138 | free (body_str); | 140 | free (body_str); |