Commit 331695a4 authored by Tom Lane's avatar Tom Lane

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
a1dc6ab4, spotted by Coverity.
parent 9679345f
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment