New patch - two decimal-related memory leak fixes.
Happens on 8.4 and 8.5, maybe on older trees as well.
One of the two chunks was in the SQLDA patch originally.
This is independent from any other patches.
--
Bible has answers for everything. Proof:
"But let your communication be, Yea, yea; Nay, nay: for whatsoever is more
than these cometh of evil." (Matthew 5:37) - basics of digital technology.
"May your kingdom come" - superficial description of plate tectonics
----------------------------------
Zoltán Böszörményi
Cybertec Schönig & Schönig GmbH
http://www.postgresql.at/
diff -dcrpN pgsql.ifdef/src/interfaces/ecpg/compatlib/informix.c
pgsql.decimalfix/src/interfaces/ecpg/compatlib/informix.c
*** pgsql.ifdef/src/interfaces/ecpg/compatlib/informix.c 2009-09-03 12:25:47.000000000 +0200
--- pgsql.decimalfix/src/interfaces/ecpg/compatlib/informix.c 2009-09-15 12:35:48.000000000 +0200
*************** deccvasc(char *cp, int len, decimal *np)
*** 232,238 ****
{
int i = PGTYPESnumeric_to_decimal(result, np);
! free(result);
if (i != 0)
ret = ECPG_INFORMIX_NUM_OVERFLOW;
}
--- 232,238 ----
{
int i = PGTYPESnumeric_to_decimal(result, np);
! PGTYPESnumeric_free(result);
if (i != 0)
ret = ECPG_INFORMIX_NUM_OVERFLOW;
}
diff -dcrpN pgsql.dyncursor/src/interfaces/ecpg/ecpglib/data.c pgsql.sqlda/src/interfaces/ecpg/ecpglib/data.c
*** pgsql.dyncursor/src/interfaces/ecpg/ecpglib/data.c 2009-08-08 17:19:45.000000000 +0200
--- pgsql.sqlda/src/interfaces/ecpg/ecpglib/data.c 2009-09-03 12:56:36.000000000 +0200
*************** ecpg_get_data(const PGresult *results, i
*** 554,560 ****
else
PGTYPESnumeric_to_decimal(nres, (decimal *) (var + offset * act_tuple));
! free(nres);
break;
case ECPGt_interval:
--- 554,560 ----
else
PGTYPESnumeric_to_decimal(nres, (decimal *) (var + offset * act_tuple));
! PGTYPESnumeric_free(nres);
break;
case ECPGt_interval: