Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Jelte Fennema <postgres(at)jeltef(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, duspensky(at)ya(dot)ru, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Date: 2021-03-16 18:03:34
Message-ID: 3376868.1615917814@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2021-03-16 12:31:17 -0400, Tom Lane wrote:
>> I'm wondering about that because I see some other stuff in be_tls_init()
>> that looks like it might get leaked, notably the root_cert_list read
>> from the ssl_ca_file.

> Given that we're careful to destroy the "temporary" ssl context in case
> of error, perhaps the best way to deal with root_cert_list being freed
> in case of error would be to assign it to the context as soon as its
> loaded?

Yeah, I came to the same conclusion downthread. I'll go see about
making that happen.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2021-03-16 18:12:26 Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption
Previous Message Andres Freund 2021-03-16 18:01:09 Re: BUG #16160: Minor memory leak in case of starting postgres server with SSL encryption