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:21:03 +0200 |
commit | 94a484222caece19e381a6941b8d826027ac2e75 (patch) | |
tree | 70cdda36851d1249ed1ac9c6db0b59b7b1a8041f /src/interfaces/ecpg/compatlib/informix.c | |
parent | af0b49fc98cb3494d1e444a4f5c3364627a3ed5f (diff) | |
download | postgresql-94a484222caece19e381a6941b8d826027ac2e75.tar.gz postgresql-94a484222caece19e381a6941b8d826027ac2e75.zip |
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 8d81c83dedd..9f7776ee919 100644 --- a/src/interfaces/ecpg/compatlib/informix.c +++ b/src/interfaces/ecpg/compatlib/informix.c @@ -1032,6 +1032,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)); } |