diff options
author | Pierre Joye <pajoye@php.net> | 2011-07-28 10:57:31 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-07-28 10:57:31 +0000 |
commit | c8a621b191651614f5936c63a17775309a31496e (patch) | |
tree | 79b2e10e5d21250ea82c4c14c913880a8d04bb5b | |
parent | b3ccd26eb44d0026750eed2e3a47e0ebae8699e6 (diff) | |
download | php-git-c8a621b191651614f5936c63a17775309a31496e.tar.gz |
- Fix #55301 (sybase part) check if malloc succeded
-rw-r--r-- | ext/sybase_ct/php_sybase_ct.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 14b346cbab..f85b46c07d 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -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); |