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

Commitddd50a0

Browse files
committed
This patch fixes a very small memory leak in psql, spotted with
valgrind.Neil Conway
1 parent1ef7ba2 commitddd50a0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/bin/psql/command.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000-2002 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.92 2003/03/18 22:15:43petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.93 2003/03/19 22:49:43momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"command.h"
@@ -882,6 +882,8 @@ exec_command(const char *cmd,
882882
{
883883
if (status!=CMD_UNKNOWN)
884884
psql_error("\\%s: extra argument '%s' ignored\n",cmd,val);
885+
if (val)
886+
free(val);
885887
}
886888

887889
if (options_string&&continue_parse)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp