Skip to content

Commit 7807ecd

Browse files
author
pajoye
committed
- Fix #55301 (interbase part) check if malloc succeded
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@313829 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 85538e1 commit 7807ecd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

ext/interbase/interbase.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,9 +998,12 @@ static void _php_ibase_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /*
998998
ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link);
999999
} else {
10001000
zend_rsrc_list_entry new_le;
1001-
1001+
10021002
ib_link = (ibase_db_link *) malloc(sizeof(ibase_db_link));
1003-
1003+
if (!ib_link) {
1004+
RETURN_FALSE;
1005+
}
1006+
10041007
/* hash it up */
10051008
Z_TYPE(new_le) = le_plink;
10061009
new_le.ptr = ib_link;

0 commit comments

Comments
 (0)