Commit: 53d4abb16c78a7c35c7df0d7e2f8c51baa01ca8f Author: Dmitry Stogov <dmi...@zend.com> Mon, 18 Feb 2013 13:13:25 +0400 Parents: f18678bbcf79e4ecdb4bd0f48cab8f614d284ac2 Branches: PHP-5.5 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=53d4abb16c78a7c35c7df0d7e2f8c51baa01ca8f Log: Avoid static analyzer warning Changed paths: M zend_accelerator_hash.c Diff: diff --git a/zend_accelerator_hash.c b/zend_accelerator_hash.c index 8257ac2..dbdc2ef 100644 --- a/zend_accelerator_hash.c +++ b/zend_accelerator_hash.c @@ -55,12 +55,14 @@ void zend_accel_hash_init(zend_accel_hash *accel_hash, zend_uint hash_size) accel_hash->hash_table = zend_shared_alloc(sizeof(zend_accel_hash_entry *)*accel_hash->max_num_entries); if (!accel_hash->hash_table) { zend_accel_error(ACCEL_LOG_FATAL, "Insufficient shared memory!"); + return; } /* set up hash values table */ accel_hash->hash_entries = zend_shared_alloc(sizeof(zend_accel_hash_entry)*accel_hash->max_num_entries); if (!accel_hash->hash_entries) { zend_accel_error(ACCEL_LOG_FATAL, "Insufficient shared memory!"); + return; } memset(accel_hash->hash_table, 0, sizeof(zend_accel_hash_entry *)*accel_hash->max_num_entries); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php