Re: libpq leaks memory for SSL connections - Mailing list pgsql-bugs

From Tom Lane
Subject Re: libpq leaks memory for SSL connections
Date
Msg-id 3632212.1633117599@sss.pgh.pa.us
Whole thread Raw
In response to libpq leaks memory for SSL connections  (Timo Sirainen <timo@sirainen.com>)
Responses Re: libpq leaks memory for SSL connections  (Timo Sirainen <timo@sirainen.com>)
List pgsql-bugs
Timo Sirainen <timo@sirainen.com> writes:
> I noticed with valgrind how libpq is leaking memory:
> at 0x483577F: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
> by 0x5F645C8: CRYPTO_zalloc (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
> by 0x5E94EEF: BIO_meth_new (in /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1)
> by 0x65181EB: ??? (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)
> by 0x651950C: ??? (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)
> by 0x650140F: PQconnectPoll (in /usr/lib/x86_64-linux-gnu/libpq.so.5.11)

I see no leak here.  The struct is allocated once and kept for possible
re-use by future connections.  valgrind concurs, saying it's "still
reachable".

            regards, tom lane



pgsql-bugs by date:

Previous
From: Edouard HIBON
Date:
Subject: Re: BUG #17206: the function array_cat(anyarray, anyarray) does not exist
Next
From: Timo Sirainen
Date:
Subject: Re: libpq leaks memory for SSL connections