Skip to content

Commit ddd50a0

Browse files
committed
This patch fixes a very small memory leak in psql, spotted with
valgrind. Neil Conway
1 parent 1ef7ba2 commit ddd50a0

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:43 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/command.c,v 1.93 2003/03/19 22:49:43 momjian 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy