pajoye                                   Thu, 28 Jul 2011 10:57:31 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=313833

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

Bug: https://bugs.php.net/55301 (error getting bug information)
      
Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/sybase_ct/php_sybase_ct.c
    U   php/php-src/branches/PHP_5_4/ext/sybase_ct/php_sybase_ct.c

Modified: php/php-src/branches/PHP_5_3/ext/sybase_ct/php_sybase_ct.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sybase_ct/php_sybase_ct.c  2011-07-28 
10:52:45 UTC (rev 313832)
+++ php/php-src/branches/PHP_5_3/ext/sybase_ct/php_sybase_ct.c  2011-07-28 
10:57:31 UTC (rev 313833)
@@ -777,6 +777,10 @@
                        }

                        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);

Modified: php/php-src/branches/PHP_5_4/ext/sybase_ct/php_sybase_ct.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/sybase_ct/php_sybase_ct.c  2011-07-28 
10:52:45 UTC (rev 313832)
+++ php/php-src/branches/PHP_5_4/ext/sybase_ct/php_sybase_ct.c  2011-07-28 
10:57:31 UTC (rev 313833)
@@ -777,6 +777,10 @@
                        }

                        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);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to