From 693a591c34af23757a6f74f5b01fb06e12b9e28f Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Thu, 10 Feb 2022 11:54:27 +1100 Subject: [PATCH v2] GetRelationPublicationActions - comment code. Added a comment to clarify why code that on brief inspection appears unreachable, might be necessary. --- src/backend/utils/cache/relcache.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 2707fed..616ac5d 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -5598,6 +5598,10 @@ GetRelationPublicationActions(Relation relation) break; } + /* + * The rd_pubactions is probably still NULL, but just in case something + * already made it valid, avoid leaking memory. + */ if (relation->rd_pubactions) { pfree(relation->rd_pubactions); -- 1.8.3.1