From 0bf22e855332d35b5be1608cb8c65d3a1cfe93aa Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 23 Feb 2017 12:20:44 +0100 Subject: [PATCH] fix #4911 --- src/microhttpd/response.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/microhttpd/response.c b/src/microhttpd/response.c index a0897d8b..8ad6a9d7 100644 --- 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;