diff options
author | Pierre Joye <pajoye@php.net> | 2011-07-28 10:39:08 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-07-28 10:39:08 +0000 |
commit | bc165d3a65222c1a7d01f52390a6ce330f9298ea (patch) | |
tree | 1d68fcd0ca92f53b683ed90856497b10f4e67005 /ext/interbase | |
parent | 3f28c4eb113df5a6d9a6f37204d271cb578bfce8 (diff) | |
download | php-git-bc165d3a65222c1a7d01f52390a6ce330f9298ea.tar.gz |
- Fix #55301 (interbase part) check if malloc succeded
Diffstat (limited to 'ext/interbase')
-rw-r--r-- | ext/interbase/interbase.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 1e1440cbd3..6578469852 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -998,9 +998,12 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link); } else { zend_rsrc_list_entry new_le; - + ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link)); - + if (!ib_link) { + RETURN_FALSE; + } + /* hash it up */ Z_TYPE(new_le) = le_plink; new_le.ptr = ib_link; |