aboutsummaryrefslogtreecommitdiff
path: root/src/examples/querystring_example.c
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-14 14:36:39 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2022-05-14 14:37:02 +0300
commita13647d1d0418d612010e8ceb6fe560ffaffcf2d (patch)
tree79526b4486e76b9589e2e504b669290064e0d833 /src/examples/querystring_example.c
parentf50b6be7a6088dbff621613bfec82d6fef62dca3 (diff)
downloadlibmicrohttpd-a13647d1d0418d612010e8ceb6fe560ffaffcf2d.tar.gz
libmicrohttpd-a13647d1d0418d612010e8ceb6fe560ffaffcf2d.zip
Replaced MHD_RESPMEM_MUST_FREE with more portable solution in examples
Diffstat (limited to 'src/examples/querystring_example.c')
-rw-r--r--src/examples/querystring_example.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/examples/querystring_example.c b/src/examples/querystring_example.c
index 57de5aa7..97a92ae2 100644
--- a/src/examples/querystring_example.c
+++ b/src/examples/querystring_example.c
@@ -72,8 +72,10 @@ ahc_echo (void *cls,
72 free (me); 72 free (me);
73 return MHD_NO; /* Error forming the response body */ 73 return MHD_NO; /* Error forming the response body */
74 } 74 }
75 response = MHD_create_response_from_buffer (resp_len, me, 75 response =
76 MHD_RESPMEM_MUST_FREE); 76 MHD_create_response_from_buffer_with_free_callback (resp_len,
77 (void *) me,
78 &free);
77 if (response == NULL) 79 if (response == NULL)
78 { 80 {
79 free (me); 81 free (me);