1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00

- Fix #55301 (sybase part) check if malloc succeded

This commit is contained in:
Pierre Joye
2011-07-28 10:57:31 +00:00
parent 74de7dd66d
commit 61780c3dbc

View File

@@ -777,6 +777,10 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
}
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)) {
free(sybase_ptr);
efree(hashed_details);