Revision 0d0266a5

b/target-alpha/translate.c
2466 2466
    uint64_t hwpcb;
2467 2467

  
2468 2468
    env = qemu_mallocz(sizeof(CPUAlphaState));
2469
    if (!env)
2470
        return NULL;
2471 2469
    cpu_exec_init(env);
2472 2470
    alpha_translate_init();
2473 2471
    tlb_flush(env, 1);
b/target-arm/helper.c
248 248
    if (id == 0)
249 249
        return NULL;
250 250
    env = qemu_mallocz(sizeof(CPUARMState));
251
    if (!env)
252
        return NULL;
253 251
    cpu_exec_init(env);
254 252
    if (!inited) {
255 253
        inited = 1;
......
468 466
static void allocate_mmon_state(CPUState *env)
469 467
{
470 468
    env->mmon_entry = malloc(sizeof (mmon_state));
471
    if (!env->mmon_entry)
472
        abort();
473 469
    memset (env->mmon_entry, 0, sizeof (mmon_state));
474 470
    env->mmon_entry->cpu_env = env;
475 471
    mmon_head = env->mmon_entry;
b/target-cris/translate.c
3400 3400
	int i;
3401 3401

  
3402 3402
	env = qemu_mallocz(sizeof(CPUCRISState));
3403
	if (!env)
3404
		return NULL;
3405 3403

  
3406 3404
	cpu_exec_init(env);
3407 3405
	cpu_reset(env);
b/target-i386/helper.c
1645 1645
    static int inited;
1646 1646

  
1647 1647
    env = qemu_mallocz(sizeof(CPUX86State));
1648
    if (!env)
1649
        return NULL;
1650 1648
    cpu_exec_init(env);
1651 1649
    env->cpu_model_str = cpu_model;
1652 1650

  
b/target-i386/kvm.c
97 97

  
98 98
        kvm_msr_list = qemu_mallocz(sizeof(msr_list) +
99 99
                                    msr_list.nmsrs * sizeof(msr_list.indices[0]));
100
        if (kvm_msr_list == NULL)
101
            return 0;
102 100

  
103 101
        kvm_msr_list->nmsrs = msr_list.nmsrs;
104 102
        ret = kvm_ioctl(env->kvm_state, KVM_GET_MSR_INDEX_LIST, kvm_msr_list);
b/target-m68k/helper.c
166 166
    static int inited;
167 167

  
168 168
    env = qemu_mallocz(sizeof(CPUM68KState));
169
    if (!env)
170
        return NULL;
171 169
    cpu_exec_init(env);
172 170
    if (!inited) {
173 171
        inited = 1;
b/target-mips/translate.c
8476 8476
    if (!def)
8477 8477
        return NULL;
8478 8478
    env = qemu_mallocz(sizeof(CPUMIPSState));
8479
    if (!env)
8480
        return NULL;
8481 8479
    env->cpu_model = def;
8482 8480

  
8483 8481
    cpu_exec_init(env);
b/target-ppc/helper.c
2761 2761
        return NULL;
2762 2762

  
2763 2763
    env = qemu_mallocz(sizeof(CPUPPCState));
2764
    if (!env)
2765
        return NULL;
2766 2764
    cpu_exec_init(env);
2767 2765
    ppc_translate_init();
2768 2766
    env->cpu_model_str = cpu_model;
b/target-ppc/kvm_ppc.c
33 33
    pathlen = snprintf(NULL, 0, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop)
34 34
              + 1;
35 35
    path = qemu_malloc(pathlen);
36
    if (path == NULL) {
37
        ret = -ENOMEM;
38
        goto out;
39
    }
40 36

  
41 37
    snprintf(path, pathlen, "%s/%s/%s", PROC_DEVTREE_PATH, node_path, prop);
42 38

  
b/target-ppc/translate_init.c
9040 9040
    opc_handler_t **tmp;
9041 9041

  
9042 9042
    tmp = malloc(0x20 * sizeof(opc_handler_t));
9043
    if (tmp == NULL)
9044
        return -1;
9045 9043
    fill_new_table(tmp, 0x20);
9046 9044
    table[idx] = (opc_handler_t *)((unsigned long)tmp | PPC_INDIRECT);
9047 9045

  
b/target-sh4/translate.c
277 277
    if (!def)
278 278
	return NULL;
279 279
    env = qemu_mallocz(sizeof(CPUSH4State));
280
    if (!env)
281
	return NULL;
282 280
    env->features = def->features;
283 281
    cpu_exec_init(env);
284 282
    sh4_translate_init();
b/target-sparc/helper.c
713 713
    CPUSPARCState *env;
714 714

  
715 715
    env = qemu_mallocz(sizeof(CPUSPARCState));
716
    if (!env)
717
        return NULL;
718 716
    cpu_exec_init(env);
719 717

  
720 718
    gen_intermediate_code_init(env);

Also available in: Unified diff