summary refs log tree commit diff stats
path: root/qapi/string-input-visitor.c
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2017-10-19 14:31:59 +0800
committerJuan Quintela <quintela@redhat.com>2017-10-23 18:03:37 +0200
commit84593a0807004d852132eaa56edf24d55793d480 (patch)
treee886e0075c487cb434d3f3961169d2513cbf974b /qapi/string-input-visitor.c
parent7d7c96be7b25f285b3759ec0545bbe82dd0d8076 (diff)
downloadfocaccia-qemu-84593a0807004d852132eaa56edf24d55793d480.tar.gz
focaccia-qemu-84593a0807004d852132eaa56edf24d55793d480.zip
migration: clean up xbzrle cache init/destroy
Let's further simplify ram_init_all() and ram_save_cleanup() by abstract
all the XBZRLE related codes into their own functions.

When allocating xbzrle cache, we are always very careful on -ENOMEM;
which makes sense.  Replacing the last g_malloc0() with g_try_malloc0(),
then refactor the logic a bit.

This patch should be fixing some memory leaks when some memory
allocation failed for XBZRLE in the past.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'qapi/string-input-visitor.c')
0 files changed, 0 insertions, 0 deletions