Fix memory leak in pg_restore.c
authorAndrew Dunstan <[email protected]>
Thu, 10 Apr 2025 18:54:39 +0000 (14:54 -0400)
committerAndrew Dunstan <[email protected]>
Thu, 10 Apr 2025 18:57:02 +0000 (14:57 -0400)
Oversight in 1495eff7bdb

Author: Ranier Vilela <[email protected]>

src/bin/pg_dump/pg_restore.c

index 06c28ab314921a5524cefeb191fb3fd0768c9753..dc1f4bfbbcd0c473a4f94ac2a61dd275926baad0 100644 (file)
@@ -902,6 +902,8 @@ read_one_statement(StringInfo inBuf, FILE *pfile)
            break;
        }
 
+       destroyStringInfo(&q);
+
        if (c == '\n')
            appendStringInfoChar(inBuf, (char) '\n');
    }