summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan2025-04-10 18:54:39 +0000
committerAndrew Dunstan2025-04-10 18:57:02 +0000
commit22cb6d289500ef22163a9d7cf2afa496f41b4d4c (patch)
tree911a759545f8e9ffafe45c74eefff37919468e55
parentd89335eea67c1cb55b03d5235320cc107287b59a (diff)
Fix memory leak in pg_restore.c
Oversight in 1495eff7bdb Author: Ranier Vilela <ranier.vf@gmail.com>
-rw-r--r--src/bin/pg_dump/pg_restore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 06c28ab3149..dc1f4bfbbcd 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -902,6 +902,8 @@ read_one_statement(StringInfo inBuf, FILE *pfile)
break;
}
+ destroyStringInfo(&q);
+
if (c == '\n')
appendStringInfoChar(inBuf, (char) '\n');
}