diff -r ae61523bce20 -r 2f71f4ee247a libidav/session.c --- a/libidav/session.c Thu Oct 03 18:52:51 2024 +0200 +++ b/libidav/session.c Sun Oct 06 18:18:04 2024 +0200 @@ -31,7 +31,6 @@ #include #include -#include #include #include @@ -119,7 +118,7 @@ DavSession *newsn = malloc(sizeof(DavSession)); memset(newsn, 0, sizeof(DavSession)); - newsn->mp = cxMempoolCreate(DAV_SESSION_MEMPOOL_SIZE, NULL); + newsn->mp = cxBasicMempoolCreate(DAV_SESSION_MEMPOOL_SIZE); newsn->pathcache = cxHashMapCreate(sn->mp->allocator, CX_STORE_POINTERS, DAV_PATH_CACHE_SIZE); newsn->key = sn->key; newsn->errorstr = NULL; @@ -636,16 +635,6 @@ if(cxMapRemoveAndGet(locks->resource_locks, cx_hash_key_str(path))) { return; } - - CxMutIterator i = cxListMutIterator(locks->collection_locks); - int rm = 0; - cx_foreach(DavLock* , cl, i) { - if(rm) { - break; - } - if(cl == lock) { - cxIteratorFlagRemoval(i); - rm = 1; - } - } + + cxListFindRemove(locks->collection_locks, lock); }