Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9ad6e0d

Browse files
committed
More pg_dump patch cleanups.
1 parent a7d417c commit 9ad6e0d

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

src/bin/pg_dump/pg_dump.c

+9-6
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.34 1997/07/23 17:14:59 momjian Exp $
24+
* $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.35 1997/07/23 17:42:25 momjian Exp $
2525
*
2626
* Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
2727
*
@@ -782,17 +782,21 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
782782
int i,j;
783783
for(i=0;i<numTables;++i) {
784784

785+
if(tblinfo[i].oid) free (tblinfo[i].oid);
786+
if(tblinfo[i].relname) free (tblinfo[i].relname);
787+
if(tblinfo[i].relarch) free (tblinfo[i].relarch);
788+
if(tblinfo[i].relacl) free (tblinfo[i].relacl);
789+
if(tblinfo[i].sequence) free (tblinfo[i].sequence);
790+
if(tblinfo[i].usename) free (tblinfo[i].usename);
791+
785792
/* skip archive tables */
786793
if (isArchiveName(tblinfo[i].relname))
787794
continue;
788795

789796
if ( tblinfo[i].sequence )
790797
continue;
791798

792-
if(tblinfo[i].oid) free (tblinfo[i].oid);
793-
if(tblinfo[i].relname) free (tblinfo[i].relname);
794-
if(tblinfo[i].relarch) free (tblinfo[i].relarch);
795-
if(tblinfo[i].relacl) free (tblinfo[i].relacl);
799+
/* Process Attributes */
796800
for(j=0;j<tblinfo[i].numatts;j++) {
797801
if(tblinfo[i].attnames[j]) free (tblinfo[i].attnames[j]);
798802
if(tblinfo[i].typnames[j]) free (tblinfo[i].typnames[j]);
@@ -801,7 +805,6 @@ clearTableInfo(TableInfo *tblinfo, int numTables)
801805
if(tblinfo[i].inhAttrs) free((int *)tblinfo[i].inhAttrs);
802806
if(tblinfo[i].attnames) free (tblinfo[i].attnames);
803807
if(tblinfo[i].typnames) free (tblinfo[i].typnames);
804-
if(tblinfo[i].usename) free (tblinfo[i].usename);
805808
}
806809
free(tblinfo);
807810
}

0 commit comments

Comments
 (0)