From: Jes Sorensen Date: Mon, 6 Dec 2010 14:25:34 +0000 (+0100) Subject: Add missing tracing to qemu_mallocz() X-Git-Tag: v0.14.0-rc0~351^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=236e2376818251382f8811d46503581fde798ea3;p=thirdparty%2Fqemu.git Add missing tracing to qemu_mallocz() Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- diff --git a/qemu-malloc.c b/qemu-malloc.c index 28fb05a481f..b9b38514ac1 100644 --- a/qemu-malloc.c +++ b/qemu-malloc.c @@ -64,10 +64,13 @@ void *qemu_realloc(void *ptr, size_t size) void *qemu_mallocz(size_t size) { + void *ptr; if (!size && !allow_zero_malloc()) { abort(); } - return qemu_oom_check(calloc(1, size ? size : 1)); + ptr = qemu_oom_check(calloc(1, size ? size : 1)); + trace_qemu_malloc(size, ptr); + return ptr; } char *qemu_strdup(const char *str)