From 5fb272d662eca0707b1a5c7747ae476f8157d332 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Mon, 23 Jul 2018 19:29:44 +0200 Subject: fix --- src/gns/plugin_rest_gns.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') 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); } -- cgit v1.2.3