From 430f7e1eb5676a35072fa9766dd4cfe90a4bc249 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Dec 2011 16:46:16 +0000 Subject: [PATCH] -fix 2034, request can be cancelled in which case rh might be NULL here --- src/fs/gnunet-service-fs_pr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c index 5ebca1ad7..dcaba1203 100644 --- a/src/fs/gnunet-service-fs_pr.c +++ b/src/fs/gnunet-service-fs_pr.c @@ -358,9 +358,10 @@ GSF_pending_request_create_ (enum GSF_PendingRequestOptions options, GNUNET_assert (dpr != NULL); if (pr == dpr) break; /* let the request live briefly... */ - dpr->rh (dpr->rh_cls, GNUNET_BLOCK_EVALUATION_REQUEST_VALID, dpr, - UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_BLOCK_TYPE_ANY, - NULL, 0); + if (NULL != dpr->rh) + dpr->rh (dpr->rh_cls, GNUNET_BLOCK_EVALUATION_REQUEST_VALID, dpr, + UINT32_MAX, GNUNET_TIME_UNIT_FOREVER_ABS, GNUNET_BLOCK_TYPE_ANY, + NULL, 0); GSF_pending_request_cancel_ (dpr, GNUNET_YES); } } -- 2.25.1