summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Riggs2016-09-08 09:32:58 +0000
committerSimon Riggs2016-09-08 09:32:58 +0000
commit67c6bd1ca3ce75778138bf4713444a5a6b46032e (patch)
tree956a8d638d61482e02d2ddb4e908f3404a4ec0ad
parentd299eb41dfc7b73dec80f22554b952f01c9d54a4 (diff)
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
-rw-r--r--src/backend/access/transam/twophase.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/access/transam/twophase.c b/src/backend/access/transam/twophase.c
index 9f55adcaf5e..1323fb508dc 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);