src/server/daemon/resourcepool.c

changeset 579
e10457d74fe1
parent 573
76ccfc2a932f
--- a/src/server/daemon/resourcepool.c	Mon Feb 10 17:44:51 2025 +0100
+++ b/src/server/daemon/resourcepool.c	Sun Mar 02 18:10:52 2025 +0100
@@ -44,7 +44,7 @@
 }
 
 void resource_pool_cleanup(void) {
-    cxMapDestroy(resource_pool_types);
+    cxMapFree(resource_pool_types);
 }
 
 int resourcepool_register_type(const char *type_name, ResourceType *type_info) {
@@ -231,7 +231,8 @@
     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
-        if(!cxMapRemoveAndGet(nsapi_rq->resources, cx_hash_key_str(respool->name))) {
+        void *value;
+        if(!cxMapRemoveAndGet(nsapi_rq->resources, cx_hash_key_str(respool->name), &value)) {
             log_ereport(LOG_FAILURE, "resourcepool_free: cannot remove resource from request: potential double free");
         }
     }

mercurial