src/server/plugins/postgresql/vfs.c

branch
webdav
changeset 280
d0d5a970292f
parent 279
79029fe26aae
child 281
e9dc53661df4
--- a/src/server/plugins/postgresql/vfs.c	Mon Jan 31 17:18:12 2022 +0100
+++ b/src/server/plugins/postgresql/vfs.c	Mon Jan 31 21:33:46 2022 +0100
@@ -366,5 +366,15 @@
 }
 
 void pg_vfs_dirio_close(VFS_DIR dir) {
+    pool_handle_t *pool = dir->ctx->pool;
+    PgDir *pg = dir->data;
+    if(pg->result) {
+        PQclear(pg->result);
+    }
+    PgFile *pgfile = pg->file->data;
     
+    pool_free(pool, pgfile);
+    pool_free(pool, pg->file);
+    pool_free(pool, pg);
+    pool_free(pool, dir);
 }

mercurial