Skip to content

Commit 119496e

Browse files
committed
Backport memory leak fix from multimaster branch
1 parent 89e1be6 commit 119496e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3895,6 +3895,7 @@ BackendStartup(Port *port)
38953895
*/
38963896
if (!pg_strong_random(&MyCancelKey, sizeof(MyCancelKey)))
38973897
{
3898+
free(bn);
38983899
ereport(LOG,
38993900
(errmsg("could not generate random query cancel key")));
39003901
return STATUS_ERROR;
@@ -5549,6 +5550,7 @@ assign_backendlist_entry(RegisteredBgWorker *rw)
55495550
*/
55505551
if (!pg_strong_random(&MyCancelKey, sizeof(MyCancelKey)))
55515552
{
5553+
free(bn);
55525554
rw->rw_crashed_at = GetCurrentTimestamp();
55535555
return false;
55545556
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy