Commit 6c08905d authored by Tom Lane's avatar Tom Lane

Remove overenthusiastic free'ing of comment dependencies; could lead to

core dump in pg_dump when dumping views having comments.  See bug #855.
parent 1868b0be
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
* by PostgreSQL * by PostgreSQL
* *
* IDENTIFICATION * 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) ...@@ -5496,12 +5496,7 @@ dumpOneTable(Archive *fout, TableInfo *tbinfo, TableInfo *g_tblinfo)
/* Dump Table Comments */ /* Dump Table Comments */
dumpTableComment(fout, tbinfo, reltypename, commentDeps); dumpTableComment(fout, tbinfo, reltypename, commentDeps);
if (commentDeps) /* commentDeps now belongs to the archive entry ... don't free it! */
{
for (j = 0; (*commentDeps)[j] != NULL; j++)
free((void *) (*commentDeps)[j]);
free(commentDeps);
}
destroyPQExpBuffer(query); destroyPQExpBuffer(query);
destroyPQExpBuffer(q); destroyPQExpBuffer(q);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment