mirror of
https://github.com/php/php-src.git
synced 2025-08-19 17:04:47 +02:00
- Fix #55301 (sybase part) check if malloc succeded
This commit is contained in:
parent
b3ccd26eb4
commit
c8a621b191
1 changed files with 4 additions and 0 deletions
|
@ -777,6 +777,10 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
|
||||||
}
|
}
|
||||||
|
|
||||||
sybase_ptr = (sybase_link *) malloc(sizeof(sybase_link));
|
sybase_ptr = (sybase_link *) malloc(sizeof(sybase_link));
|
||||||
|
if (sybase_ptr) {
|
||||||
|
efree(hashed_details);
|
||||||
|
RETURN_FALSE;
|
||||||
|
}
|
||||||
if (!php_sybase_do_connect_internal(sybase_ptr, host, user, passwd, charset, appname TSRMLS_CC)) {
|
if (!php_sybase_do_connect_internal(sybase_ptr, host, user, passwd, charset, appname TSRMLS_CC)) {
|
||||||
free(sybase_ptr);
|
free(sybase_ptr);
|
||||||
efree(hashed_details);
|
efree(hashed_details);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue