diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-03-19 18:58:23 +0100 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2018-03-20 12:32:06 +0000 |
commit | 95372184b7acdfd82ee748b6f0c6df1d839982ba (patch) | |
tree | 96e0b1cae7d431eebaf7de5b6ea1fd2b079a0d73 /target | |
parent | 32cd6550f7a6c8a621798c8b249eae2597db04ea (diff) | |
download | qemu-95372184b7acdfd82ee748b6f0c6df1d839982ba.zip qemu-95372184b7acdfd82ee748b6f0c6df1d839982ba.tar.gz qemu-95372184b7acdfd82ee748b6f0c6df1d839982ba.tar.bz2 |
hmp: free sev info
Found thanks to ASAN:
Direct leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x7efe20417a38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
#1 0x7efe1f7b2f75 in g_malloc0 ../glib/gmem.c:124
#2 0x7efe1f7b3249 in g_malloc0_n ../glib/gmem.c:355
#3 0x558272879162 in sev_get_info /home/elmarco/src/qemu/target/i386/sev.c:414
#4 0x55827285113b in hmp_info_sev /home/elmarco/src/qemu/target/i386/monitor.c:684
#5 0x5582724043b8 in handle_hmp_command /home/elmarco/src/qemu/monitor.c:3333
Fixes: 63036314
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20180319175823.22111-1-marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/monitor.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/i386/monitor.c b/target/i386/monitor.c index 011419e..a890b3c 100644 --- a/target/i386/monitor.c +++ b/target/i386/monitor.c @@ -696,6 +696,8 @@ void hmp_info_sev(Monitor *mon, const QDict *qdict) } else { monitor_printf(mon, "SEV is not enabled\n"); } + + qapi_free_SevInfo(info); } SevLaunchMeasureInfo *qmp_query_sev_launch_measure(Error **errp) |