pajoye                                   Thu, 28 Jul 2011 10:39:19 +0000

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

Log:
- Fix #55301 (interbase 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/interbase/interbase.c

Modified: php/php-src/branches/PHP_5_3/ext/interbase/interbase.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/interbase/interbase.c      2011-07-28 
10:39:08 UTC (rev 313829)
+++ php/php-src/branches/PHP_5_3/ext/interbase/interbase.c      2011-07-28 
10:39:19 UTC (rev 313830)
@@ -998,9 +998,12 @@
                        ZEND_REGISTER_RESOURCE(return_value, ib_link, le_link);
                } else {
                        zend_rsrc_list_entry new_le;
-
+
                        ib_link = (ibase_db_link *) 
malloc(sizeof(ibase_db_link));
-
+                       if (!ib_link) {
+                               RETURN_FALSE;
+                       }
+
                        /* hash it up */
                        Z_TYPE(new_le) = le_plink;
                        new_le.ptr = ib_link;

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

Reply via email to