From: Dmitry Stogov Date: Mon, 18 Feb 2013 09:13:25 +0000 (+0400) Subject: Avoid static analyzer warning X-Git-Tag: php-5.5.0beta1~42^2~58 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53d4abb16c78a7c35c7df0d7e2f8c51baa01ca8f;p=php Avoid static analyzer warning --- diff --git a/zend_accelerator_hash.c b/zend_accelerator_hash.c index 8257ac2e52..dbdc2ef140 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); }