Applied patch by Boszormenyi Zoltan <[email protected]> to fix memory leak in decimal...
authorMichael Meskes <[email protected]>
Thu, 1 Oct 2009 18:03:54 +0000 (18:03 +0000)
committerMichael Meskes <[email protected]>
Thu, 1 Oct 2009 18:03:54 +0000 (18:03 +0000)
src/interfaces/ecpg/ChangeLog
src/interfaces/ecpg/compatlib/informix.c
src/interfaces/ecpg/ecpglib/data.c

index e45e2ca8185c2d414e98658621103e87752f309d..1f803c9f9e838aa21686eb5a01b29d017317d364 100644 (file)
@@ -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.
index 4abedfc6ba639f763bc42ca4c091b6b2e1beef5e..c79ea192dd4c690a5ec5a0969c0ed51c71707d63 100644 (file)
@@ -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;
                }
index 659888977941476394d3ce87fd19f156f1575703..550dcb73bdcbcc6c67edc3a8f5205c966ab7c99d 100644 (file)
@@ -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: