diff options
author | Michael Meskes | 2009-10-01 18:03:54 +0000 |
---|---|---|
committer | Michael Meskes | 2009-10-01 18:03:54 +0000 |
commit | e777fd4ee111311f421a11825ba3c515cba1f95d (patch) | |
tree | 5e65973691a09fb7979dee598c34ac35760208e5 | |
parent | d41392ae3e16806f8175c2c20db030ba8d43cbb6 (diff) |
Applied patch by Boszormenyi Zoltan <[email protected]> to fix memory leak in decimal handling.
-rw-r--r-- | src/interfaces/ecpg/ChangeLog | 5 | ||||
-rw-r--r-- | src/interfaces/ecpg/compatlib/informix.c | 2 | ||||
-rw-r--r-- | 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 <[email protected]> to add missing ";" to rule in pgc.l. + +Thu, 01 Oct 2009 19:31:57 +0200 + + - Applied patch by Boszormenyi Zoltan <[email protected]> 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: |