diff options
Diffstat (limited to 'src/gns/plugin_rest_gns.c')
-rw-r--r-- | src/gns/plugin_rest_gns.c | 11 |
1 files changed, 10 insertions, 1 deletions
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) | |||
281 | return record_obj; | 281 | return record_obj; |
282 | } | 282 | } |
283 | 283 | ||
284 | |||
285 | static void | ||
286 | do_cleanup (void *cls) | ||
287 | { | ||
288 | struct LookupHandle *handle = cls; | ||
289 | cleanup_handle (handle); | ||
290 | } | ||
291 | |||
292 | |||
284 | /** | 293 | /** |
285 | * Function called with the result of a GNS lookup. | 294 | * Function called with the result of a GNS lookup. |
286 | * | 295 | * |
@@ -325,7 +334,7 @@ process_lookup_result (void *cls, uint32_t rd_count, | |||
325 | resp = GNUNET_REST_create_response (result); | 334 | resp = GNUNET_REST_create_response (result); |
326 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); | 335 | handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); |
327 | GNUNET_free (result); | 336 | GNUNET_free (result); |
328 | cleanup_handle (handle); | 337 | GNUNET_SCHEDULER_add_now (&do_cleanup, handle); |
329 | } | 338 | } |
330 | 339 | ||
331 | 340 | ||