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
qemu-file-buf.c
qemu-file-internal.h
qemu-file-stdio.c
qemu-file-unix.c osdep: remove use of socket_error() from all code 2016-03-10 17:19:34 +00:00
qemu-file.c
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
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