diff options
author | Michael Meskes <meskes@postgresql.org> | 2015-06-15 14:21:03 +0200 |
---|---|---|
committer | Michael Meskes <meskes@postgresql.org> | 2015-06-15 14:23:21 +0200 |
commit | 6ab1a53dd595098390d2412e4f6d390f206b82dc (patch) | |
tree | 19da7824cd8582de68cfccbe27f7f3488fed8a77 /src/interfaces/ecpg/compatlib/informix.c | |
parent | a38f08bb9de6064fe3f42d273bd60a96adceb4bd (diff) |
Check for out of memory when allocating sqlca.
Patch by Michael Paquier
Diffstat (limited to 'src/interfaces/ecpg/compatlib/informix.c')
-rw-r--r-- | src/interfaces/ecpg/compatlib/informix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/compatlib/informix.c b/src/interfaces/ecpg/compatlib/informix.c index fdd175983e1..1e59fbc9850 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -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)); } |