From 69463b95e54fd5c179845b418c5a25afbee663c4 Mon Sep 17 00:00:00 2001 From: Greg Nancarrow Date: Wed, 16 Jun 2021 18:58:23 +1000 Subject: [PATCH] Fix potential case of attempted pfree() of junk "members" value on GetMultiXactIdMembers() error. --- src/backend/access/transam/multixact.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/backend/access/transam/multixact.c b/src/backend/access/transam/multixact.c index daab546f29..a81fe72d3c 100644 --- a/src/backend/access/transam/multixact.c +++ b/src/backend/access/transam/multixact.c @@ -1241,7 +1241,10 @@ GetMultiXactIdMembers(MultiXactId multi, MultiXactMember **members, debug_elog3(DEBUG2, "GetMembers: asked for %u", multi); if (!MultiXactIdIsValid(multi) || from_pgupgrade) + { + *members = NULL; return -1; + } /* See if the MultiXactId is in the local cache */ length = mXactCacheGetById(multi, members); -- 2.27.0