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/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. */ 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