Skip to content
Snippets Groups Projects
Commit 88d639e6 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Protect from null param on ecpg disconnect, verified by Roland Karch

parent 0f8e9b4d
No related branches found
No related tags found
No related merge requests found
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.204 2002/12/12 21:50:01 momjian Exp $ */
/* $Header: /cvsroot/pgsql/src/interfaces/ecpg/preproc/Attic/preproc.y,v 1.205 2002/12/13 20:29:07 momjian Exp $ */
/* Copyright comment */
%{
......@@ -554,7 +554,8 @@ stmt: AlterDatabaseSetStmt { output_statement($1, 0, connection); }
if (connection)
mmerror(PARSE_ERROR, ET_ERROR, "no at option for disconnect statement.\n");
fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);", $1);
fprintf(yyout, "{ ECPGdisconnect(__LINE__, %s);",
$1 ? $1 : "\"CURRENT\"");
whenever_action(2);
free($1);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment