From: Arran Cudbard-Bell Date: Fri, 17 May 2024 20:53:30 +0000 (-0600) Subject: Quiet coverity X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66cf26be5e195b56c70288c98a3e62680ff38154;p=thirdparty%2Ffreeradius-server.git Quiet coverity --- diff --git a/src/modules/rlm_rest/rlm_rest.c b/src/modules/rlm_rest/rlm_rest.c index ad75530006d..956bcf67f78 100644 --- a/src/modules/rlm_rest/rlm_rest.c +++ b/src/modules/rlm_rest/rlm_rest.c @@ -21,8 +21,6 @@ * * @copyright 2012-2019,2024 Arran Cudbard-Bell (a.cudbardb@freeradius.org) */ - -#include RCSID("$Id$") #include @@ -47,6 +45,9 @@ RCSID("$Id$") #include #include +#include +#include + #include "rest.h" static int rest_uri_part_escape(fr_value_box_t *vb, void *uctx); @@ -1207,12 +1208,19 @@ static int _rest_request_cleanup(fr_curl_io_request_t *randle, UNUSED void *uctx } #ifndef NDEBUG - /* - * With curl 7.61 when a request in cancelled we get a result - * with a NULL (invalid) pointer to private data. This lets - * us know that it was request returned to the slab. - */ - curl_easy_setopt(candle, CURLOPT_PRIVATE, (void *)0xdeadc341); + { + CURLcode ret; + /* + * With curl 7.61 when a request in cancelled we get a result + * with a NULL (invalid) pointer to private data. This lets + * us know that it was request returned to the slab. + */ + ret = curl_easy_setopt(candle, CURLOPT_PRIVATE, (void *)0xdeadc341); + if (unlikely(ret != CURLE_OK)) { + ERROR("Failed to set private data on curl easy handle %p: %s", + candle, curl_easy_strerror(ret)); + } + } #endif /*