qemu/migration
Pan Nengyuan 59c59c67ee migration/rdma: fix a memleak on error path in rdma_start_incoming_migration
'rdma->host' is malloced in qemu_rdma_data_init, but forgot to free on the error
path in rdma_start_incoming_migration(), this patch fix that.

The leak stack:
Direct leak of 2 byte(s) in 1 object(s) allocated from:
    #0 0x7fb7add18ae8 in __interceptor_malloc (/lib64/libasan.so.5+0xefae8)
    #1 0x7fb7ad0df1d5 in g_malloc (/lib64/libglib-2.0.so.0+0x531d5)
    #2 0x7fb7ad0f8b32 in g_strdup (/lib64/libglib-2.0.so.0+0x6cb32)
    #3 0x55a0464a0f6f in qemu_rdma_data_init /mnt/sdb/qemu/migration/rdma.c:2647
    #4 0x55a0464b0e76 in rdma_start_incoming_migration /mnt/sdb/qemu/migration/rdma.c:4020
    #5 0x55a0463f898a in qemu_start_incoming_migration /mnt/sdb/qemu/migration/migration.c:365
    #6 0x55a0458c75d3 in qemu_init /mnt/sdb/qemu/softmmu/vl.c:4438
    #7 0x55a046a3d811 in main /mnt/sdb/qemu/softmmu/main.c:48
    #8 0x7fb7a8417872 in __libc_start_main (/lib64/libc.so.6+0x23872)
    #9 0x55a04536b26d in _start (/mnt/sdb/qemu/build/x86_64-softmmu/qemu-system-x86_64+0x286926d)

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
Message-Id: <20200420102727.17339-1-pannengyuan@huawei.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
2020-05-07 17:40:24 +01:00
..
block-dirty-bitmap.c block/dirty-bitmap: refactor bdrv_dirty_bitmap_next 2019-10-17 17:02:32 -04:00
block.c migration/block: rename BLOCK_SIZE macro 2020-02-28 09:25:49 +01:00
block.h migration: disable auto-converge during bulk block migration 2017-09-27 11:27:14 +01:00
channel.c migration: fix the multifd code when receiving less channels 2019-01-23 15:02:07 +00:00
channel.h migration: Route errors down through migration_channel_connect 2018-02-06 10:55:12 +00:00
colo-failover.c migration/colo.c: Remove redundant input parameter 2019-05-14 17:33:35 +01:00
colo.c migration/colo: Add missing error-propagation code 2020-05-07 17:40:24 +01:00
exec.c migration: unify incoming processing 2018-07-10 12:48:53 +01:00
exec.h migration: Export exec.c functions in its own file 2017-06-01 18:49:22 +02:00
fd.c migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
fd.h migration: Fix fd protocol for incoming defer 2019-06-05 12:43:55 +02:00
global_state.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
Makefile.objs multifd: Add zstd compression multifd support 2020-02-28 09:25:49 +01:00
migration.c migration/throttle: Add cpu-throttle-tailslow migration parameter 2020-05-07 17:40:24 +01:00
migration.h multifd: Add multifd-zstd-level parameter 2020-02-28 09:25:28 +01:00
multifd-zlib.c multifd: Add zlib compression multifd support 2020-02-28 09:24:43 +01:00
multifd-zstd.c multifd: Add zstd compression multifd support 2020-02-28 09:25:49 +01:00
multifd.c lockable: replaced locks with lock guard macros where appropriate 2020-05-04 16:07:43 +01:00
multifd.h multifd: Add zstd compression multifd support 2020-02-28 09:25:49 +01:00
page_cache.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
page_cache.h migration: Make cache_init() take an error parameter 2017-10-23 18:03:25 +02:00
postcopy-ram.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
postcopy-ram.h migration/postcopy: rename postcopy_ram_enable_notify to postcopy_ram_incoming_setup 2019-10-11 14:59:58 +01:00
qemu-file-channel.c Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
qemu-file-channel.h migration: Export qemu-file-channel.c functions in its own file 2017-05-18 19:20:50 +02:00
qemu-file.c migration/compress: compress QEMUFile is not writable 2020-01-29 11:28:59 +01:00
qemu-file.h Header cleanup patches for 2019-08-13 2019-08-16 14:53:43 +01:00
qjson.c qobject: Replace qobject_incref/QINCREF qobject_decref/QDECREF 2018-05-04 08:27:53 +02:00
qjson.h migration: fix vmdesc leak on vmstate_save() error 2019-09-25 15:51:19 +01:00
ram.c migration/ram: Consolidate variable reset after placement in ram_load_postcopy() 2020-05-07 17:40:24 +01:00
ram.h COLO: Optimize memory back-up process 2020-03-13 09:36:30 +00:00
rdma.c migration/rdma: fix a memleak on error path in rdma_start_incoming_migration 2020-05-07 17:40:24 +01:00
rdma.h migration: Export rdma.c functions in its own file 2017-06-01 18:49:23 +02:00
savevm.c migration/savevm: release gslist after dump_vmstate_json 2020-02-28 09:25:49 +01:00
savevm.h migration: Optimization about wait-unplug migration state 2020-02-13 10:53:10 +01:00
socket.c multifd: Use number of channels as listen backlog 2019-09-03 23:24:42 +02:00
socket.h migration: Export functions to create send channels 2018-05-15 20:24:27 +02:00
tls.c migration: add support for a "tls-authz" migration parameter 2019-03-25 18:13:47 +01:00
tls.h migration: Export tls.c functions in its own file 2017-06-01 18:49:23 +02:00
trace-events migration: Support QLIST migration 2020-01-20 09:10:23 +01:00
vmstate-types.c migration: Simplify get_qlist 2020-01-29 11:28:59 +01:00
vmstate.c migration/vmstate: Remove redundant statement in vmstate_save_state_v() 2020-02-28 09:25:49 +01:00
xbzrle.c migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00
xbzrle.h migration: Create migration/xbzrle.h 2017-05-18 18:04:54 +02:00