Re: [PATCH v1] fix potential memory leak in untransformRelOptions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v1] fix potential memory leak in untransformRelOptions
Date
Msg-id 403275.1662041404@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH v1] fix potential memory leak in untransformRelOptions  (Junwang Zhao <zhjwpku@gmail.com>)
Responses Re: [PATCH v1] fix potential memory leak in untransformRelOptions
Re: [PATCH v1] fix potential memory leak in untransformRelOptions
List pgsql-hackers
Junwang Zhao <zhjwpku@gmail.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



pgsql-hackers by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: Junwang Zhao
Date:
Subject: Re: [PATCH v1] fix potential memory leak in untransformRelOptions