libidav/webdav.c

changeset 786
f9d6e4cbcb62
parent 747
efbd59642577
child 788
9b9420041d8e
--- a/libidav/webdav.c	Thu Aug 10 09:40:54 2023 +0200
+++ b/libidav/webdav.c	Thu Sep 07 10:29:17 2023 +0200
@@ -399,6 +399,14 @@
     va_end(ap);
     
     dav_free_statement(stmt);
+    
+    if(result.status == -1) {
+        if(result.result) {
+            dav_resource_free(result.result);
+            result.result = NULL;
+        }
+    }
+    
     return result.result;
 }
 

mercurial