mirror of
https://github.com/postgres/postgres.git
synced 2025-07-08 11:42:09 +03:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user