From 088d64090386f1aa5f58546f5c1e531f13ce92c9 Mon Sep 17 00:00:00 2001 From: Alexandr Kuznetsov Date: Sat, 28 Sep 2024 23:29:00 +0300 Subject: [PATCH 1/2] Another place where refcnt in the COL_INFO object is unfortunately (#55) erased. Signed-off-by: Alexandr Kuznetsov --- descriptor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/descriptor.c b/descriptor.c index b473a4d9..1718cfcb 100644 --- a/descriptor.c +++ b/descriptor.c @@ -58,7 +58,11 @@ void TI_ClearObject(TABLE_INFO *ti) MYLOG(0, "!!!refcnt %p:%d -> %d\n", coli, coli->refcnt, coli->refcnt - 1); coli->refcnt--; if (coli->refcnt <= 1 && 0 == coli->acc_time) /* acc_time == 0 means the table is dropped */ + { + Int2 tmp_refcnt = coli->refcnt; /* If refcnt is still above 0, we must save it. */ free_col_info_contents(coli); /* Now coli object is unused, and may be reused later. */ + coli->refcnt = tmp_refcnt; + } if (coli->refcnt <= 0) { /* Last reference to coli object disappeared. Now destroying it. */ From 24a0d1ce2e7d5d65785977cf9b9f6164b5826bb2 Mon Sep 17 00:00:00 2001 From: Dave Cramer Date: Mon, 30 Sep 2024 11:42:48 -0400 Subject: [PATCH 2/2] cherry pick fixes for memory leaks and update version --- configure.ac | 2 +- version.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 16cc90b5..010e7afb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(psqlodbc, 16.00.0000, [pgsql-odbc@postgresql.org]) +AC_INIT(psqlodbc, 16.00.0007, [pgsql-odbc@postgresql.org]) AC_PREREQ(2.57) AC_CONFIG_AUX_DIR(config) AM_INIT_AUTOMAKE diff --git a/version.h b/version.h index 67cca3f9..a06e66db 100644 --- a/version.h +++ b/version.h @@ -14,13 +14,13 @@ * and PG_DRVFILE_VERSION via winbuild/psqlodbc.vcxproj. */ #ifndef POSTGRESDRIVERVERSION -#define POSTGRESDRIVERVERSION "16.00.0005" +#define POSTGRESDRIVERVERSION "16.00.0007" #endif #ifndef POSTGRES_RESOURCE_VERSION #define POSTGRES_RESOURCE_VERSION POSTGRESDRIVERVERSION #endif #ifndef PG_DRVFILE_VERSION -#define PG_DRVFILE_VERSION 16,0,00,00 +#define PG_DRVFILE_VERSION 16,0,00,07 #endif #endif