psql: Fix memory leak with \gx used within a pipeline

Michael Paquier <michael@paquier.xyz>

Commit: 54d23601b978d2552696fb7fe35ae5d6102ea2cb
Author: Michael Paquier <michael@paquier.xyz>
Date: 2025-03-04T22:56:03Z
Releases: 18.0
psql: Fix memory leak with \gx used within a pipeline

While inside a pipeline, \gx is currently forbidden and will make
exec_command_g() exit early.  There was a memory leak in this code path,
so let's fix it.

Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Discussion: https://postgr.es/m/CAO6_XqqFVQjLjZQiL7xdwLpzZEy1ghO_JWvCFPM_OmwF9s7XdA@mail.gmail.com

Files

PathChange+/−
src/bin/psql/command.c modified +1 −0

Discussion