diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-26 15:51:56 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-26 15:51:56 +0000 |
commit | 726b28a61c858b4b251e4a0a006e4021b01886c0 (patch) | |
tree | 8b8d6dded055f1fefd2cee84dabb59dc889dcfe8 /src/rest/gnunet-rest-server.c | |
parent | 9982f58b45230373960cea1fe1fb294602bdd56d (diff) | |
download | gnunet-726b28a61c858b4b251e4a0a006e4021b01886c0.tar.gz gnunet-726b28a61c858b4b251e4a0a006e4021b01886c0.zip |
-fix mem corruption
Diffstat (limited to 'src/rest/gnunet-rest-server.c')
-rw-r--r-- | src/rest/gnunet-rest-server.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c index 84fc69d02..aa95e48b3 100644 --- a/src/rest/gnunet-rest-server.c +++ b/src/rest/gnunet-rest-server.c | |||
@@ -292,7 +292,7 @@ create_response (void *cls, | |||
292 | } | 292 | } |
293 | if (NULL == con_handle->plugin) | 293 | if (NULL == con_handle->plugin) |
294 | { | 294 | { |
295 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 295 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
296 | "Queueing response with MHD\n"); | 296 | "Queueing response with MHD\n"); |
297 | GNUNET_free (con_handle); | 297 | GNUNET_free (con_handle); |
298 | return MHD_queue_response (con, | 298 | return MHD_queue_response (con, |
@@ -356,15 +356,6 @@ mhd_completed_cb (void *cls, | |||
356 | void **con_cls, | 356 | void **con_cls, |
357 | enum MHD_RequestTerminationCode toe) | 357 | enum MHD_RequestTerminationCode toe) |
358 | { | 358 | { |
359 | struct MhdConnectionHandle *con_handle; | ||
360 | |||
361 | con_handle = *con_cls; | ||
362 | if (NULL != con_handle) | ||
363 | { | ||
364 | MHD_destroy_response (con_handle->response); | ||
365 | GNUNET_free (con_handle); | ||
366 | *con_cls = NULL; | ||
367 | } | ||
368 | if (MHD_REQUEST_TERMINATED_COMPLETED_OK != toe) | 359 | if (MHD_REQUEST_TERMINATED_COMPLETED_OK != toe) |
369 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 360 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
370 | "MHD encountered error handling request: %d\n", | 361 | "MHD encountered error handling request: %d\n", |