Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 331695a

Browse files
committed
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 a1dc6ab, spotted by Coverity.
1 parent 9679345 commit 331695a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/ecpg/ecpglib/prepare.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ ecpg_register_prepared_stmt(struct statement *stmt)
8585
return false;
8686

8787
prep_stmt = (struct statement *) ecpg_alloc(sizeof(struct statement), lineno);
88-
if (!stmt)
88+
if (!prep_stmt)
8989
{
9090
ecpg_free(this);
9191
return false;

0 commit comments

Comments
 (0)