summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2002-12-27 17:10:55 +0000
committerTom Lane2002-12-27 17:10:55 +0000
commitd5a0f78848a593de507cb8a8a5d040dc0fcd050d (patch)
treef9ca9b91bceb065776907a2791f48e4383588d66
parent0b91b448f4e58d31db0cb87754a5f87404a70d56 (diff)
Remove overenthusiastic free'ing of comment dependencies; could lead to
core dump in pg_dump when dumping views having comments. See bug #855.
-rw-r--r--src/bin/pg_dump/pg_dump.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 3c5093e1599..a9cd4a4fe8c 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -22,7 +22,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.305.2.1 2002/12/01 18:44:09 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.305.2.2 2002/12/27 17:10:55 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -5444,12 +5444,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
/* Dump Table Comments */
dumpTableComment(fout, tbinfo, reltypename, commentDeps);
- if (commentDeps)
- {
- for (j = 0; (*commentDeps)[j] != NULL; j++)
- free((void *) (*commentDeps)[j]);
- free(commentDeps);
- }
+ /* commentDeps now belongs to the archive entry ... don't free it! */
destroyPQExpBuffer(query);
destroyPQExpBuffer(q);