Re: Memory leak in pg_hmac_final

2021-10-01 Thread Michael Paquier
On Fri, Oct 01, 2021 at 10:58:07PM +0200, Daniel Gustafsson wrote: > Nice, I hadn't heard of that before but it seems quite neat. Thanks for the fix, it looks fine. I just saw the thread. Perhaps the commit log should have said that this only impacts non-OpenSSL builds. Worth noting that in ~13

Re: Memory leak in pg_hmac_final

2021-10-01 Thread Daniel Gustafsson
> On 1 Oct 2021, at 14:31, Sergey Shinderuk wrote: > > On 01.10.2021 15:05, Daniel Gustafsson wrote: >>> On 1 Oct 2021, at 12:39, Sergey Shinderuk >>> wrote: >> >>> Here is a patch fixing the subject. >> >> Seems reasonable on a quick glance, the interim h buffer should be freed >> (this >>

Re: Memory leak in pg_hmac_final

2021-10-01 Thread Sergey Shinderuk
On 01.10.2021 15:05, Daniel Gustafsson wrote: >> On 1 Oct 2021, at 12:39, Sergey Shinderuk wrote: > >> Here is a patch fixing the subject. > > Seems reasonable on a quick glance, the interim h buffer should be freed (this > is present since 14). I'll have another look at this in a bit and will

Re: Memory leak in pg_hmac_final

2021-10-01 Thread Daniel Gustafsson
> On 1 Oct 2021, at 12:39, Sergey Shinderuk wrote: > Here is a patch fixing the subject. Seems reasonable on a quick glance, the interim h buffer should be freed (this is present since 14). I'll have another look at this in a bit and will take care of it. -- Daniel Gustafsson htt

Memory leak in pg_hmac_final

2021-10-01 Thread Sergey Shinderuk
Hi, Here is a patch fixing the subject. Regards, -- Sergey Shinderukhttps://postgrespro.com/ diff --git a/src/common/hmac.c b/src/common/hmac.c index 1089db67443..bfe2e7cb5e9 100644 --- a/src/common/hmac.c +++ b/src/common/hmac.c @@ -232,7 +232,10 @@ pg_hmac_final(pg_hmac_ctx *c