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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy