From e777fd4ee111311f421a11825ba3c515cba1f95d Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Thu, 1 Oct 2009 18:03:54 +0000 Subject: [PATCH] Applied patch by Boszormenyi Zoltan to fix memory leak in decimal handling. --- src/interfaces/ecpg/ChangeLog | 5 +++++ src/interfaces/ecpg/compatlib/informix.c | 2 +- src/interfaces/ecpg/ecpglib/data.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/interfaces/ecpg/ChangeLog b/src/interfaces/ecpg/ChangeLog index e45e2ca818..1f803c9f9e 100644 --- a/src/interfaces/ecpg/ChangeLog +++ b/src/interfaces/ecpg/ChangeLog @@ -2433,6 +2433,11 @@ Tue, 15 Sep 2009 10:17:52 +0200 - Applied patch by Boszormenyi Zoltan to add missing ";" to rule in pgc.l. + +Thu, 01 Oct 2009 19:31:57 +0200 + + - Applied patch by Boszormenyi Zoltan to fix memory + leak in decimal handling. - Set ecpg library version to 6.2. - Set compat library version to 3.2. - Set ecpg version to 4.6. diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index 4abedfc6ba..c79ea192dd 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -232,7 +232,7 @@ deccvasc(char *cp, int len, decimal *np) { int i = PGTYPESnumeric_to_decimal(result, np); - free(result); + PGTYPESnumeric_free(result); if (i != 0) ret = ECPG_INFORMIX_NUM_OVERFLOW; } diff --git a/src/interfaces/ecpg/ecpglib/data.c b/src/interfaces/ecpg/ecpglib/data.c index 6598889779..550dcb73bd 100644 --- a/src/interfaces/ecpg/ecpglib/data.c +++ b/src/interfaces/ecpg/ecpglib/data.c @@ -554,7 +554,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno, else PGTYPESnumeric_to_decimal(nres, (decimal *) (var + offset * act_tuple)); - free(nres); + PGTYPESnumeric_free(nres); break; case ECPGt_interval: -- 2.39.5