*shared_segments_count = 1;
*shared_segments_p = (zend_shared_segment **) calloc(1, sizeof(zend_shared_segment) + sizeof(void *));
+ if (!*shared_segments_p) {
+ *error_in = "calloc";
+ return ALLOC_FAILURE;
+ }
shared_segment = (zend_shared_segment *)((char *)(*shared_segments_p) + sizeof(void *));
(*shared_segments_p)[0] = shared_segment;
*shared_segments_count = 1;
*shared_segments_p = (zend_shared_segment_posix **) calloc(1, sizeof(zend_shared_segment_posix) + sizeof(void *));
+ if (!*shared_segments_p) {
+ *error_in = "calloc";
+ rerurn ALLOC_FAILURE;
+ }
shared_segment = (zend_shared_segment_posix *)((char *)(*shared_segments_p) + sizeof(void *));
(*shared_segments_p)[0] = shared_segment;
*shared_segments_count = ((requested_size - 1) / seg_allocate_size) + 1;
*shared_segments_p = (zend_shared_segment_shm **) calloc(1, (*shared_segments_count) * sizeof(zend_shared_segment_shm) + sizeof(void *) * (*shared_segments_count));
+ if (!*shared_segments_p) {
+ return ALLOC_FAILURE;
+ }
shared_segments = (zend_shared_segment_shm *)((char *)(*shared_segments_p) + sizeof(void *) * (*shared_segments_count));
for (i = 0; i < *shared_segments_count; i++) {
(*shared_segments_p)[i] = shared_segments + i;
}
blacklist->entries = (zend_blacklist_entry *) calloc(sizeof(zend_blacklist_entry), blacklist->size);
+ if (!blacklist->entries) {
+ zend_accel_error(ACCEL_LOG_ERROR, "Blacklist initialization: no memory\n");
+ return;
+ }
blacklist->regexp_list = NULL;
}