aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2002-12-27 17:10:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2002-12-27 17:10:45 +0000
commit6c08905d4c07d2215c2fb09aca6b877bb161c915 (patch)
tree061b13f67e7e16b560422090fc66f3ca7c96327e /src
parent1868b0be44e44f7c03516559625a966176af5f83 (diff)
downloadpostgresql-6c08905d4c07d2215c2fb09aca6b877bb161c915.tar.gz
postgresql-6c08905d4c07d2215c2fb09aca6b877bb161c915.zip
Remove overenthusiastic free'ing of comment dependencies; could lead to
core dump in pg_dump when dumping views having comments. See bug #855.
Diffstat (limited to 'src')
-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 e5570fa6d1d..6c611f22bfd 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.312 2002/12/21 22:45:09 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.313 2002/12/27 17:10:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -5496,12 +5496,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);