ETRAX: Drop the _t for the internal PIC type.
[qemu] / qemu-malloc.c
index 1d00f26..6761857 100644 (file)
@@ -27,7 +27,7 @@
 static void *oom_check(void *ptr)
 {
     if (ptr == NULL)
-        exit(13);
+        abort();
     return ptr;
 }
 
@@ -48,7 +48,10 @@ void *qemu_malloc(size_t size)
 
 void *qemu_realloc(void *ptr, size_t size)
 {
-    return oom_check(realloc(ptr, size));
+    if (size)
+        return oom_check(realloc(ptr, size));
+    else
+        return realloc(ptr, size);
 }
 
 void *qemu_mallocz(size_t size)