diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-19 11:14:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-19 11:14:45 +0100 |
commit | 51647e6259e0492235720485a1f64ccef260b826 (patch) | |
tree | a5627ae3b9e29d1b23f29f39ae9254b109978891 /src | |
parent | b0ba819cf41a3a13a84516d4fc6574277ba2ec96 (diff) |
check return value from MHD_add_response_header()
Diffstat (limited to 'src')
-rw-r--r-- | src/exchange/taler-exchange-httpd_mhd.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_mhd.c b/src/exchange/taler-exchange-httpd_mhd.c index 62db5a86f..ee1781a1e 100644 --- a/src/exchange/taler-exchange-httpd_mhd.c +++ b/src/exchange/taler-exchange-httpd_mhd.c @@ -112,9 +112,15 @@ TEH_MHD_handler_agpl_redirect (struct TEH_RequestHandler *rh, (void) MHD_add_response_header (response, MHD_HTTP_HEADER_CONTENT_TYPE, rh->mime_type); - MHD_add_response_header (response, - MHD_HTTP_HEADER_LOCATION, - "http://www.git.taler.net/?p=exchange.git"); + if (MHD_NO == + MHD_add_response_header (response, + MHD_HTTP_HEADER_LOCATION, + "http://www.git.taler.net/?p=exchange.git")) + { + GNUNET_break (0); + MHD_destroy_response (response); + return MHD_NO; + } ret = MHD_queue_response (connection, rh->response_code, response); |