From: Tom Lane Date: Fri, 27 Dec 2002 17:10:55 +0000 (+0000) Subject: Remove overenthusiastic free'ing of comment dependencies; could lead to X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=82add8f53b5f6bdfcd811fe8d512078515cbc3d7;p=users%2Fbernd%2Fpostgres.git Remove overenthusiastic free'ing of comment dependencies; could lead to core dump in pg_dump when dumping views having comments. See bug #855. --- diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 1d9cb3affe..c4280405cf 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -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);