]> granicus.if.org Git - php/commitdiff
Avoid static analyzer warning
authorDmitry Stogov <dmitry@zend.com>
Mon, 18 Feb 2013 09:13:25 +0000 (13:13 +0400)
committerDmitry Stogov <dmitry@zend.com>
Mon, 18 Feb 2013 09:13:25 +0000 (13:13 +0400)
zend_accelerator_hash.c

index 8257ac2e52dd9fc1449ba93fa1b772b78ccff6ae..dbdc2ef1405568c6fcb973a0c88e5ae7ea0bbcef 100644 (file)
@@ -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);
 }