Skip to content

Commit 8f52496

Browse files
committed
Fix ancient memory leak in PQprintTuples(); our code no longer uses this
routine, but perhaps some applications do. Found by Martijn van Oosterhout using Coverity.
1 parent 3224f2e commit 8f52496

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/interfaces/libpq/fe-print.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* didn't really belong there.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.67 2006/03/05 15:59:09 momjian Exp $
13+
* $PostgreSQL: pgsql/src/interfaces/libpq/fe-print.c,v 1.68 2006/04/19 16:15:29 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -751,8 +751,10 @@ PQprintTuples(const PGresult *res,
751751
fprintf(fout, "|\n%s\n", tborder);
752752
}
753753
}
754-
}
755754

755+
if (tborder)
756+
free(tborder);
757+
}
756758

757759

758760
/* simply send out max-length number of filler characters to fp */

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