Skip to content

Commit fd6b3c2

Browse files
committed
fix small memory free error.
1 parent 0dc7abb commit fd6b3c2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.35 1997/07/23 17:42:25 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.36 1997/07/28 23:53:54 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -783,15 +783,17 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
783783
for(i=0;i<numTables;++i) {
784784

785785
if(tblinfo[i].oid) free (tblinfo[i].oid);
786-
if(tblinfo[i].relname) free (tblinfo[i].relname);
787786
if(tblinfo[i].relarch) free (tblinfo[i].relarch);
788787
if(tblinfo[i].relacl) free (tblinfo[i].relacl);
789-
if(tblinfo[i].sequence) free (tblinfo[i].sequence);
790788
if(tblinfo[i].usename) free (tblinfo[i].usename);
791789

792790
/* skip archive tables */
793791
if (isArchiveName(tblinfo[i].relname))
792+
{
793+
if(tblinfo[i].relname) free (tblinfo[i].relname);
794794
continue;
795+
}
796+
if(tblinfo[i].relname) free (tblinfo[i].relname);
795797

796798
if ( tblinfo[i].sequence )
797799
continue;

0 commit comments

Comments
 (0)