Re: potential memory leak in pg_regcomp()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Zhihong Yu <zyu(at)yugabyte(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: potential memory leak in pg_regcomp()
Date: 2022-07-23 03:49:25
Message-ID: 802565.1658548165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Zhihong Yu <zyu(at)yugabyte(dot)com> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2022-07-23 03:54:27 Re: Make name optional in CREATE STATISTICS
Previous Message Thomas Munro 2022-07-23 03:47:02 Re: Removing obsolete configure checks