mirror of
https://github.com/postgres/postgres.git
synced 2026-06-13 18:50:17 -04: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:
parent
9679345f3c
commit
331695a4d9
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue