From: Simon Riggs Date: Thu, 8 Sep 2016 10:20:21 +0000 (+0100) Subject: Fix minor memory leak in Standby startup X-Git-Tag: REL9_6_0~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d7c45172a673be1fc9e51e98e45a44c14d1ee78d;p=postgresql 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 --- diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c index 9f55adcaf5..1323fb508d 100644 --- a/src/backend/access/transam/twophase.c +++ b/src/backend/access/transam/twophase.c @@ -1886,6 +1886,8 @@ StandbyRecoverPreparedTransactions(bool overwriteOK) Assert(TransactionIdFollows(subxid, xid)); SubTransSetParent(xid, subxid, overwriteOK); } + + pfree(buf); } } FreeDir(cldir);