diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-02-27 23:33:04 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-02-27 23:33:04 +0100 |
commit | 17a0344495fc8fd3a12077b5f98fcd380c621268 (patch) | |
tree | cce84396bf8a5703c531525f5a44af35479f7608 | |
parent | fc495439b4e78c021bf25dce3609f47061e8c658 (diff) | |
download | libmicrohttpd-17a0344495fc8fd3a12077b5f98fcd380c621268.tar.gz libmicrohttpd-17a0344495fc8fd3a12077b5f98fcd380c621268.zip |
fix leak in test_quiesce_stream
-rw-r--r-- | src/testcurl/test_quiesce_stream.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testcurl/test_quiesce_stream.c b/src/testcurl/test_quiesce_stream.c index f908545a..5d80ee70 100644 --- a/src/testcurl/test_quiesce_stream.c +++ b/src/testcurl/test_quiesce_stream.c | |||
@@ -122,6 +122,15 @@ http_ContentReaderCallback (void *cls, | |||
122 | } | 122 | } |
123 | 123 | ||
124 | 124 | ||
125 | static void | ||
126 | free_crc_data (void *crc_data) | ||
127 | { | ||
128 | struct ContentReaderUserdata *userdata = crc_data; | ||
129 | |||
130 | free (userdata); | ||
131 | } | ||
132 | |||
133 | |||
125 | static int | 134 | static int |
126 | http_AccessHandlerCallback (void *cls, | 135 | http_AccessHandlerCallback (void *cls, |
127 | struct MHD_Connection *connection, | 136 | struct MHD_Connection *connection, |
@@ -160,7 +169,7 @@ http_AccessHandlerCallback (void *cls, | |||
160 | 32 * 1024, | 169 | 32 * 1024, |
161 | &http_ContentReaderCallback, | 170 | &http_ContentReaderCallback, |
162 | *con_cls, | 171 | *con_cls, |
163 | NULL); | 172 | &free_crc_data); |
164 | ret = MHD_queue_response (connection, | 173 | ret = MHD_queue_response (connection, |
165 | MHD_HTTP_OK, | 174 | MHD_HTTP_OK, |
166 | response); | 175 | response); |