summaryrefslogtreecommitdiff
path: root/ext/interbase
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2011-07-28 10:39:08 +0000
committerPierre Joye <pajoye@php.net>2011-07-28 10:39:08 +0000
commitbc165d3a65222c1a7d01f52390a6ce330f9298ea (patch)
tree1d68fcd0ca92f53b683ed90856497b10f4e67005 /ext/interbase
parent3f28c4eb113df5a6d9a6f37204d271cb578bfce8 (diff)
downloadphp-git-bc165d3a65222c1a7d01f52390a6ce330f9298ea.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;