Skip to content

Commit 2a4aaa3

Browse files
author
pajoye
committed
- Fix #55301 (sybase part) check if malloc succeded
git-svn-id: http://svn.php.net/repository/php/php-src/trunk@313834 c90b9560-bf6c-de11-be94-00142212c4b1
1 parent 716ae7b commit 2a4aaa3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/sybase_ct/php_sybase_ct.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,10 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
777777
}
778778

779779
sybase_ptr = (sybase_link *) malloc(sizeof(sybase_link));
780+
if (sybase_ptr) {
781+
efree(hashed_details);
782+
RETURN_FALSE;
783+
}
780784
if (!php_sybase_do_connect_internal(sybase_ptr, host, user, passwd, charset, appname TSRMLS_CC)) {
781785
free(sybase_ptr);
782786
efree(hashed_details);

0 commit comments

Comments
 (0)