pgsql: Fix small memory leak in psql's \bind command

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix small memory leak in psql's \bind command
Date: 2023-02-22 05:31:33
Message-ID: E1pUhj3-00059b-An@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix small memory leak in psql's \bind command

psql_scan_slash_option() returns a malloc()'d result through a
PQExpBuffer, and exec_command_bind() was doing an extra allocation of
this option for no effect.

Introduced in 5b66de3.

Author: Kyotaro Horiguchi
Reviewed-by: Corey Huinker
Discussion: https://postgr.es/m/20230221.115555.89096938631423206.horikyota.ntt@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8bf5af2ee6ea82a79817692de94347086da96b43

Modified Files
--------------
src/bin/psql/command.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2023-02-22 07:34:57 pgsql: pg_dump: Remove some dead code
Previous Message Michael Paquier 2023-02-22 01:56:33 pgsql: doc: Add missing values for meson options -Dcassert and -Db_cove