Fix thinko in new ECPG "PREPARE AS" code.

ecpg_register_prepared_stmt() is pretty obviously checking the wrong
variable while trying to detect malloc failure.  Error in commit
a1dc6ab46, spotted by Coverity.
This commit is contained in:
Tom Lane 2019-05-26 10:06:37 -04:00
parent 9679345f3c
commit 331695a4d9
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ ecpg_register_prepared_stmt(struct statement *stmt)
return false;
prep_stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno);
if (!stmt)
if (!prep_stmt)
{
ecpg_free(this);
return false;