[go: up one dir, main page]

Re: [PATCH v1] fix potential memory leak in untransformRelOptions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Junwang Zhao <zhjwpku(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH v1] fix potential memory leak in untransformRelOptions
Date: 2022-09-01 14:10:04
Message-ID: 403275.1662041404@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Junwang Zhao <zhjwpku(at)gmail(dot)com> writes:
> result = lappend(result, makeDefElem(pstrdup(s), val, -1));
> + pfree(s);

I wonder why it's pstrdup'ing s in the first place.

regards, tom lane

In response to Responses Browse pgsql-hackers by date
  From Date Subject
Next Message Junwang Zhao 2022-09-01 14:38:41 Re: [PATCH v1] fix potential memory leak in untransformRelOptions
Previous Message Jonathan S. Katz 2022-09-01 14:05:48 Re: POC: GROUP BY optimization