aboutsummaryrefslogtreecommitdiff
path: root/osdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep.c')
-rw-r--r--osdep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/osdep.c b/osdep.c
index d4d336462e..f843e562f1 100644
--- a/osdep.c
+++ b/osdep.c
@@ -281,6 +281,16 @@ void *qemu_malloc(size_t size)
#endif
+void *qemu_mallocz(size_t size)
+{
+ void *ptr;
+ ptr = qemu_malloc(size);
+ if (!ptr)
+ return NULL;
+ memset(ptr, 0, size);
+ return ptr;
+}
+
/****************************************************************/
/* printf support */