psql: Fix memory leak with \gx used within a pipeline
authorMichael Paquier <michael@paquier.xyz>
Tue, 4 Mar 2025 22:56:03 +0000 (07:56 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 4 Mar 2025 22:56:03 +0000 (07:56 +0900)
commit54d23601b978d2552696fb7fe35ae5d6102ea2cb
treebeb94e61dd72eab7448a24128a6df149cd0eeba0
parentb229c10164770769c3b5033785917ca7a43a2471
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
src/bin/psql/command.c