summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan2025-04-06 13:08:02 +0000
committerAndrew Dunstan2025-04-06 13:09:25 +0000
commit6d5417e634b3841dcc44bdb43f5586bcde33ddb4 (patch)
tree8b2861d8ee51fe892de1c86f76c98933e7205c55 /src
parenta8025f544854ad8b865c6b4509030ee84aa8f4a0 (diff)
Fix a couple of memory leaks in pg_restore.c
per complaint from Coverity.
Diffstat (limited to 'src')
-rw-r--r--src/bin/pg_dump/pg_restore.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index db8356405d9..c42e34b8a40 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -991,6 +991,8 @@ get_dbnames_list_to_restore(PGconn *conn,
break;
}
+ destroyPQExpBuffer(db_lit);
+
/*
* Mark db to be skipped or increment the counter of dbs to be
* restored
@@ -1006,6 +1008,8 @@ get_dbnames_list_to_restore(PGconn *conn,
}
}
+ destroyPQExpBuffer(query);
+
return count_db;
}