Protect from null param on ecpg disconnect, verified by Roland Karch
This commit is contained in:
parent
0f8e9b4d74
commit
88d639e6e8
|
@ -1,4 +1,4 @@
|
|||
/* $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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue