summaryrefslogtreecommitdiff
path: root/ext/interbase
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-07-28 10:39:19 +0000
committerPierre Joye <pajoye@php.net>2011-07-28 10:39:19 +0000
commit7ec6d3ae47b44b74712a87420062c6935f48450d (patch)
tree286e8abecf5f38e4484dc1a5a7f03182d201c1a1 /ext/interbase
parenta20deb1607104ff0d006f602db4ac62afab48706 (diff)
downloadphp-git-7ec6d3ae47b44b74712a87420062c6935f48450d.tar.gz
- Fix #55301 (interbase part) check if malloc succeded
Diffstat (limited to 'ext/interbase')
-rw-r--r--ext/interbase/interbase.c7
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;