diff options
author | Stefan Weil <sw@weilnetz.de> | 2012-08-18 22:51:29 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2012-08-20 11:05:08 -0300 |
commit | e36c87667aa2204a3f19efe7bbcb6eb41f098e40 (patch) | |
tree | 298a109a8c354eec25603754ba2021544f3bc83d /qapi/opts-visitor.c | |
parent | 682527c00409d676c0d3b9fac99ca3b2fdfd6d2c (diff) | |
download | hqemu-e36c87667aa2204a3f19efe7bbcb6eb41f098e40.zip hqemu-e36c87667aa2204a3f19efe7bbcb6eb41f098e40.tar.gz |
qapi: Fix memory leak
valgrind report:
==24534== 232 bytes in 2 blocks are definitely lost in loss record 1,245 of 1,601
==24534== at 0x4824F20: malloc (vg_replace_malloc.c:236)
==24534== by 0x293C88: malloc_and_trace (vl.c:2281)
==24534== by 0x489AD99: ??? (in /lib/libglib-2.0.so.0.2400.1)
==24534== by 0x489B23B: g_malloc0 (in /lib/libglib-2.0.so.0.2400.1)
==24534== by 0x2B4EFC: opts_visitor_new (opts-visitor.c:376)
==24534== by 0x29DEA5: net_client_init (net.c:708)
==24534== by 0x29E6C7: net_init_client (net.c:966)
==24534== by 0x2C2179: qemu_opts_foreach (qemu-option.c:1114)
==24534== by 0x29E85B: net_init_clients (net.c:1008)
==24534== by 0x296F40: main (vl.c:3463)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qapi/opts-visitor.c')
-rw-r--r-- | qapi/opts-visitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qapi/opts-visitor.c b/qapi/opts-visitor.c index a59d306..e048b6c 100644 --- a/qapi/opts-visitor.c +++ b/qapi/opts-visitor.c @@ -416,7 +416,7 @@ opts_visitor_cleanup(OptsVisitor *ov) g_hash_table_destroy(ov->unprocessed_opts); } g_free(ov->fake_id_opt); - memset(ov, '\0', sizeof *ov); + g_free(ov); } |