Revision 50401022 qemu-malloc.c

b/qemu-malloc.c
69 69

  
70 70
void *qemu_mallocz(size_t size)
71 71
{
72
    void *ptr;
73
    ptr = qemu_malloc(size);
74
    memset(ptr, 0, size);
75
    return ptr;
72
    if (!size && !allow_zero_malloc()) {
73
        abort();
74
    }
75
    return oom_check(calloc(1, size ? size : 1));
76 76
}
77 77

  
78 78
char *qemu_strdup(const char *str)

Also available in: Unified diff