libidav/davqlexec.c

changeset 101
7b3a3130be44
parent 49
2f71f4ee247a
--- a/libidav/davqlexec.c	Thu Dec 12 20:01:43 2024 +0100
+++ b/libidav/davqlexec.c	Mon Jan 06 22:22:55 2025 +0100
@@ -287,16 +287,16 @@
     CxIterator i = cxListIterator(fields);
     cx_foreach(DavQLField*, field, i) {
         if(!cx_strcmp(field->name, CX_STR("*"))) {
-            cxMapDestroy(properties);
+            cxMapFree(properties);
             *isallprop = 1;
             return create_allprop_propfind_request();
         } else if(!cx_strcmp(field->name, CX_STR("-"))) {
-            cxMapDestroy(properties);
+            cxMapFree(properties);
             return create_propfind_request(sn, NULL, "propfind", 0);
         } else {
             if(fl_add_properties(sn, a, properties, field->expr)) {
                 // TODO: set error
-                cxMapDestroy(properties);
+                cxMapFree(properties);
                 return NULL;
             }
         }
@@ -309,8 +309,8 @@
     }
     
     CxBuffer *reqbuf = create_propfind_request(sn, list, "propfind", 0);
-    cxListDestroy(list);
-    cxMapDestroy(properties);
+    cxListFree(list);
+    cxMapFree(properties);
     return reqbuf;
 }
 
@@ -478,7 +478,7 @@
     int isallprop;
     CxBuffer *rqbuf = fieldlist2propfindrequest(sn, mp->allocator, st->fields, &isallprop);
     if(!rqbuf) {
-        cxMempoolDestroy(mp);
+        cxMempoolFree(mp);
         return result;
     }
     cxMempoolRegister(mp, rqbuf, (cx_destructor_func)cxBufferFree);
@@ -527,7 +527,7 @@
     cxmutstr path = dav_format_string(mp->allocator, st->path, args, &error);
     if(error) {
         // TODO: cleanup
-        cxMempoolDestroy(mp);
+        cxMempoolFree(mp);
         return result;
     }
     
@@ -537,7 +537,7 @@
     CxBuffer *where = dav_compile_expr(sn->context, mp->allocator, st->where, args);
     if(st->where && !where) {
         // TODO: cleanup
-        cxMempoolDestroy(mp);
+        cxMempoolFree(mp);
         return result;
     }
     
@@ -571,7 +571,7 @@
                     } else {
                         // error
                         // TODO: cleanup
-                        cxMempoolDestroy(mp);
+                        cxMempoolFree(mp);
                         return result;
                     }
                 } else if(dav_identifier2resprop(column->srctext, &resprop)) {
@@ -583,7 +583,7 @@
                 } else {
                     // error
                     // TODO: cleanup
-                    cxMempoolDestroy(mp);
+                    cxMempoolFree(mp);
                     return result;
                 }
 
@@ -594,7 +594,7 @@
             } else {
                 // something is broken
                 // TODO: cleanup
-                cxMempoolDestroy(mp);
+                cxMempoolFree(mp);
                 return result;
             }
         }
@@ -613,7 +613,7 @@
     CxBuffer *rpbuf = cxBufferCreate(NULL, 4096, mp->allocator, CX_BUFFER_FREE_CONTENTS|CX_BUFFER_AUTO_EXTEND);
     if(!rpbuf) {
         // TODO: cleanup
-        cxMempoolDestroy(mp);
+        cxMempoolFree(mp);
         return result;
     }
     
@@ -686,7 +686,7 @@
                         result.result = NULL;
                         result.status = -1;
                         dav_resource_free_all(selroot);
-                        cxListDestroy(stack);
+                        cxListFree(stack);
                         break;
                     }
                 } else {
@@ -732,7 +732,7 @@
         cxBufferSeek(rpbuf, SEEK_SET, 0);
     }
     
-    cxMempoolDestroy(mp);
+    cxMempoolFree(mp);
     return result;
 }
 

mercurial