fix_resource_leak_pg_restore.patch

application/octet-stream

Filename: fix_resource_leak_pg_restore.patch
Type: application/octet-stream
Part: 0
Message: Re: Non-text mode for pg_dumpall

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
File+
src/bin/pg_dump/pg_restore.c 1 0
diff --git a/src/bin/pg_dump/pg_restore.c b/src/bin/pg_dump/pg_restore.c
index 06c28ab314..eb3109d719 100644
--- a/src/bin/pg_dump/pg_restore.c
+++ b/src/bin/pg_dump/pg_restore.c
@@ -905,6 +905,7 @@ read_one_statement(StringInfo inBuf, FILE *pfile)
 		if (c == '\n')
 			appendStringInfoChar(inBuf, (char) '\n');
 	}
+	destroyStringInfo(&q);
 
 	/* No input before EOF signal means time to quit. */
 	if (c == EOF && inBuf->len == 0)