implement pg_vfs_dirio_close webdav

Mon, 31 Jan 2022 21:33:46 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 31 Jan 2022 21:33:46 +0100
branch
webdav
changeset 280
d0d5a970292f
parent 279
79029fe26aae
child 281
e9dc53661df4

implement pg_vfs_dirio_close

src/server/plugins/postgresql/vfs.c file | annotate | diff | comparison | revisions
--- 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