mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
Check for out of memory when allocating sqlca.
Patch by Michael Paquier Conflicts: src/interfaces/ecpg/ecpglib/connect.c
This commit is contained in:
@ -132,6 +132,13 @@ ecpg_get_data(const PGresult *results, int act_tuple, int act_field, int lineno,
|
||||
int value_for_indicator = 0;
|
||||
long log_offset;
|
||||
|
||||
if (sqlca == NULL)
|
||||
{
|
||||
ecpg_raise(lineno, ECPG_OUT_OF_MEMORY,
|
||||
ECPG_SQLSTATE_ECPG_OUT_OF_MEMORY, NULL);
|
||||
return (false);
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are running in a regression test, do not log the offset variable,
|
||||
* it depends on the machine's alignment.
|
||||
|
Reference in New Issue
Block a user