]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Back-patch fix for attempt to pfree a value that's not palloc'd
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Jun 2001 01:02:59 +0000 (01:02 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 13 Jun 2001 01:02:59 +0000 (01:02 +0000)
(it's a field of a tuple).  I see Jan has already fixed this in
current sources, but 7.1.* is pretty badly broken here.

src/pl/plpgsql/src/pl_exec.c

index ec3c051ccf6aa22a0eeeadd0511b8c19d624fa33..b0b299d217d25296087c4f2e91fdf8f56681339c 100644 (file)
@@ -3,7 +3,7 @@
  *                       procedural language
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.41.2.1 2001/05/08 01:02:03 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.41.2.2 2001/06/13 01:02:59 tgl Exp $
  *
  *       This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -1922,9 +1922,6 @@ exec_stmt_dynexecute(PLpgSQL_execstate * estate,
                                                                   ObjectIdGetDatum(typeStruct->typelem),
                                                                                         Int32GetDatum(-1)));
 
-       if (!typeStruct->typbyval)
-               pfree((void *) query);
-
        ReleaseSysCache(typetup);
 
        /*
@@ -2038,9 +2035,6 @@ exec_stmt_dynfors(PLpgSQL_execstate * estate, PLpgSQL_stmt_dynfors * stmt)
                                                                   ObjectIdGetDatum(typeStruct->typelem),
                                                                                         Int32GetDatum(-1)));
 
-       if (!typeStruct->typbyval)
-               pfree((void *) query);
-
        ReleaseSysCache(typetup);
 
        /*