From cd9b18db5c906675a904e67d0ee865ac40c1324f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Julius=20B=C3=BCnger?= Date: Thu, 29 Sep 2016 23:46:25 +0000 Subject: [PATCH] -fix rps service: prevent calling _request_cancel() twice --- src/rps/gnunet-service-rps.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/rps/gnunet-service-rps.c b/src/rps/gnunet-service-rps.c index 11a2215c5..344140ce8 100644 --- a/src/rps/gnunet-service-rps.c +++ b/src/rps/gnunet-service-rps.c @@ -926,7 +926,10 @@ destroy_reply_cls (struct ReplyCls *rep_cls) cli_ctx = rep_cls->cli_ctx; GNUNET_assert (NULL != cli_ctx); - RPS_sampler_request_cancel (rep_cls->req_handle); + if (NULL != rep_cls->req_handle) + { + RPS_sampler_request_cancel (rep_cls->req_handle); + } GNUNET_CONTAINER_DLL_remove (cli_ctx->rep_cls_head, cli_ctx->rep_cls_tail, rep_cls); @@ -1035,6 +1038,7 @@ client_respond (void *cls, cli_ctx = reply_cls->cli_ctx; GNUNET_assert (NULL != cli_ctx); + reply_cls->req_handle = NULL; destroy_reply_cls (reply_cls); GNUNET_MQ_send (cli_ctx->mq, ev); } -- 2.25.1