diff options
author | Jes Sorensen <Jes.Sorensen@redhat.com> | 2010-12-06 15:25:34 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2010-12-14 15:44:21 +0100 |
commit | 236e2376818251382f8811d46503581fde798ea3 (patch) | |
tree | 0b038d82a6bc365bce4d595c9d113dd45836dac2 /qemu-malloc.c | |
parent | 16905d717507d3daffa714c7f0fd5403873807b2 (diff) |
Add missing tracing to qemu_mallocz()
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-malloc.c')
-rw-r--r-- | qemu-malloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qemu-malloc.c b/qemu-malloc.c index 28fb05a481..b9b38514ac 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) |