Re: potential memory leak in pg_regcomp()

2022-07-22 Thread Tom Lane
Zhihong Yu writes: > I was looking at pg_regcomp(): > re->re_guts = VS(MALLOC(sizeof(struct guts))); > I did some search trying to find where re_guts is freed but haven't > found it. In rfree(), which is called from freev(). regards, tom lane

Re: potential memory leak in pg_regcomp()

2022-07-22 Thread Michael Paquier
On Fri, Jul 22, 2022 at 08:20:04PM -0700, Zhihong Yu wrote: > Hi, > I was looking at pg_regcomp(): > > re->re_guts = VS(MALLOC(sizeof(struct guts))); > > I did some search trying to find where re_guts is freed but haven't > found it. > Can someone enlighten me? Oops. It seems that you are r

potential memory leak in pg_regcomp()

2022-07-22 Thread Zhihong Yu
Hi, I was looking at pg_regcomp(): re->re_guts = VS(MALLOC(sizeof(struct guts))); I did some search trying to find where re_guts is freed but haven't found it. Can someone enlighten me? Thanks