From 2a781b5bb260209be0d856c6a43d15194d6848e0 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 15 Jun 2015 14:21:03 +0200 Subject: Check for out of memory when allocating sqlca. Patch by Michael Paquier --- src/interfaces/ecpg/compatlib/informix.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/interfaces/ecpg/compatlib/informix.c') 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)); } -- cgit v1.2.3