Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d7c4517

Browse files
Fix minor memory leak in Standby startup
StandbyRecoverPreparedTransactions() leaked the buffer used for two phase state file. This was leaked once at startup and at every shutdown checkpoint seen. Backpatch to 9.6 Stas Kelvich
1 parent 5c8cb8c commit d7c4517

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/access/transam/twophase.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,8 @@ StandbyRecoverPreparedTransactions(bool overwriteOK)
18861886
Assert(TransactionIdFollows(subxid, xid));
18871887
SubTransSetParent(xid, subxid, overwriteOK);
18881888
}
1889+
1890+
pfree(buf);
18891891
}
18901892
}
18911893
FreeDir(cldir);

0 commit comments

Comments
 (0)