Skip to content

Commit fabf75c

Browse files
author
Michael Meskes
committed
Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory leak in decimal handling.
1 parent f3aec2c commit fabf75c

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2433,6 +2433,11 @@ Tue, 15 Sep 2009 10:17:52 +0200
24332433

24342434
- Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add missing
24352435
";" to rule in pgc.l.
2436+
2437+
Thu, 01 Oct 2009 19:31:57 +0200
2438+
2439+
- Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to fix memory
2440+
leak in decimal handling.
24362441
- Set ecpg library version to 6.2.
24372442
- Set compat library version to 3.2.
24382443
- Set ecpg version to 4.6.

src/interfaces/ecpg/compatlib/informix.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.61 2009/09/03 09:59:20 meskes Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/compatlib/informix.c,v 1.62 2009/10/01 18:03:54 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -232,7 +232,7 @@ deccvasc(char *cp, int len, decimal *np)
232232
{
233233
int i = PGTYPESnumeric_to_decimal(result, np);
234234

235-
free(result);
235+
PGTYPESnumeric_free(result);
236236
if (i != 0)
237237
ret = ECPG_INFORMIX_NUM_OVERFLOW;
238238
}

src/interfaces/ecpg/ecpglib/data.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.44 2009/08/07 16:47:53 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/src/interfaces/ecpg/ecpglib/data.c,v 1.45 2009/10/01 18:03:54 meskes Exp $ */
22

33
#define POSTGRES_ECPG_INTERNAL
44
#include "postgres_fe.h"
@@ -554,7 +554,7 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
554554
else
555555
PGTYPESnumeric_to_decimal(nres, (decimal *) (var + offset * act_tuple));
556556

557-
free(nres);
557+
PGTYPESnumeric_free(nres);
558558
break;
559559

560560
case ECPGt_interval:

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy