Sun, 01 Jun 2025 20:01:13 +0200
replace wrong cxMapRemoveAndGet with cxMapRemove
| src/server/daemon/resourcepool.c | file | annotate | diff | comparison | revisions |
--- a/src/server/daemon/resourcepool.c Fri May 30 17:10:59 2025 +0200 +++ b/src/server/daemon/resourcepool.c Sun Jun 01 20:01:13 2025 +0200 @@ -230,9 +230,7 @@ if(nsapi_rq && !nsapi_rq->finished) { // request processing still ongoing and SAFs will be executed - // TODO: future ucx cxMapRemove returns, if it actually removed something, therefore use just cxMapRemove - void *value; - if(!cxMapRemoveAndGet(nsapi_rq->resources, cx_hash_key_str(respool->name), &value)) { + if(cxMapRemove(nsapi_rq->resources, cx_hash_key_str(respool->name))) { log_ereport(LOG_FAILURE, "resourcepool_free: cannot remove resource from request: potential double free"); } }