Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit54d2360

Browse files
committed
psql: Fix memory leak with \gx used within a pipeline
While inside a pipeline, \gx is currently forbidden and will makeexec_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
1 parentb229c10 commit54d2360

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎src/bin/psql/command.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1739,6 +1739,7 @@ exec_command_g(PsqlScanState scan_state, bool active_branch, const char *cmd)
17391739
{
17401740
pg_log_error("\\gx not allowed in pipeline mode");
17411741
clean_extended_state();
1742+
free(fname);
17421743
returnPSQL_CMD_ERROR;
17431744
}
17441745

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp