libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 0bf22e855332d35b5be1608cb8c65d3a1cfe93aa
parent 813fc203ef95f7e3b1d410e182d363a30f5fdad3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 23 Feb 2017 12:20:44 +0100

fix #4911

Diffstat:
Msrc/microhttpd/response.c | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c @@ -595,9 +595,11 @@ MHD_create_response_from_data (size_t size, must_free = MHD_YES; data = tmp; } - response->crc = NULL; - response->crfc = must_free ? &free : NULL; - response->crc_cls = must_free ? data : NULL; + if (must_free) + { + response->crfc = &free; + response->crc_cls = data; + } response->reference_count = 1; response->total_size = size; response->data = data;