Skip to content

Commit 37732a2

Browse files
committed
Fix minor leak in pg_dump for ACCESS METHOD.
Bug reported by Coverity. Author: Michaël Paquier
1 parent 59a2111 commit 37732a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/bin/pg_dump/pg_dump.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11580,6 +11580,7 @@ dumpAccessMethod(Archive *fout, AccessMethodInfo *aminfo)
1158011580
default:
1158111581
write_msg(NULL, "WARNING: invalid type %c of access method %s\n",
1158211582
aminfo->amtype, qamname);
11583+
pg_free(qamname);
1158311584
destroyPQExpBuffer(q);
1158411585
destroyPQExpBuffer(delq);
1158511586
destroyPQExpBuffer(labelq);
@@ -11609,7 +11610,7 @@ dumpAccessMethod(Archive *fout, AccessMethodInfo *aminfo)
1160911610
NULL, "",
1161011611
aminfo->dobj.catId, 0, aminfo->dobj.dumpId);
1161111612

11612-
free(qamname);
11613+
pg_free(qamname);
1161311614

1161411615
destroyPQExpBuffer(q);
1161511616
destroyPQExpBuffer(delq);

0 commit comments

Comments
 (0)