qemu-e2k/migration
Kevin Wolf 88be7b4be4 block: Fix bdrv_next() memory leak
The bdrv_next() users all leaked the BdrvNextIterator after completing
the iteration. Simply changing bdrv_next() to free the iterator before
returning NULL at the end of list doesn't work because some callers exit
the loop before looking at all BDSes.

This patch moves the BdrvNextIterator from the heap to the stack of
the caller and switches to a bdrv_first()/bdrv_next() interface for
initialising the iterator.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
2016-05-25 19:04:10 +02:00
..
block.c block: Fix bdrv_next() memory leak 2016-05-25 19:04:10 +02:00
exec.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
fd.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
Makefile.objs migration: Move qjson.[ch] to migration/ 2016-05-23 14:16:09 +05:30
migration.c migration: regain control of images when migration fails to complete 2016-05-23 22:19:36 +05:30
postcopy-ram.c migration/postcopy-ram: Guard use of sys/eventfd.h with CONFIG_EVENTFD 2016-02-26 15:05:25 +05:30
qemu-file-buf.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-internal.h
qemu-file-stdio.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qemu-file-unix.c osdep: remove use of socket_error() from all code 2016-03-10 17:19:34 +00:00
qemu-file.c migration: Clean up includes 2016-01-29 15:07:22 +00:00
qjson.c migration/qjson: Drop gratuitous use of QOM 2016-05-23 14:16:12 +05:30
ram.c migration fixes: 2016-05-24 12:21:07 +01:00
rdma.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00
savevm.c migration fixes: 2016-05-24 12:21:07 +01:00
tcp.c osdep: remove use of socket_error() from all code 2016-03-10 17:19:34 +00:00
unix.c migration: rename 'file' in MigrationState to 'to_dst_file' 2016-02-05 19:09:50 +05:30
vmstate.c migration: Move qjson.[ch] to migration/ 2016-05-23 14:16:09 +05:30
xbzrle.c util: move declarations out of qemu-common.h 2016-03-22 22:20:17 +01:00