1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-30 06:01:21 +03:00

Check for out of memory when allocating sqlca.

Patch by Michael Paquier
This commit is contained in:
Michael Meskes
2015-06-15 14:21:03 +02:00
parent a38f08bb9d
commit 6ab1a53dd5
7 changed files with 104 additions and 1 deletions

View File

@@ -1033,6 +1033,8 @@ void
ECPG_informix_reset_sqlca(void)
{
struct sqlca_t *sqlca = ECPGget_sqlca();
if (sqlca == NULL)
return;
memcpy((char *) sqlca, (char *) &sqlca_init, sizeof(struct sqlca_t));
}