From: Schanzenbach, Martin Date: Mon, 23 Jul 2018 17:29:44 +0000 (+0200) Subject: fix X-Git-Tag: v0.11.0~322^2~42 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5fb272d662eca0707b1a5c7747ae476f8157d332;p=oweals%2Fgnunet.git fix --- diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c index 2b729db54..e76a5d116 100644 --- a/src/gns/plugin_rest_gns.c +++ b/src/gns/plugin_rest_gns.c @@ -281,6 +281,15 @@ gnsrecord_to_json (const struct GNUNET_GNSRECORD_Data *rd) return record_obj; } + +static void +do_cleanup (void *cls) +{ + struct LookupHandle *handle = cls; + cleanup_handle (handle); +} + + /** * Function called with the result of a GNS lookup. * @@ -325,7 +334,7 @@ process_lookup_result (void *cls, uint32_t rd_count, resp = GNUNET_REST_create_response (result); handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); GNUNET_free (result); - cleanup_handle (handle); + GNUNET_SCHEDULER_add_now (&do_cleanup, handle); }