diff options
author | Tuguoyi <tu.guoyi@h3c.com> | 2020-11-02 09:04:57 +0000 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2020-11-03 16:24:56 +0100 |
commit | 6aec830e77a3f80952b41e421dc23c0041c1e399 (patch) | |
tree | 1804af8f2579516acc202853722cfff695992831 /qemu-img.c | |
parent | eada6d9220b77ffee13a86ca8a7aba8fc4451e71 (diff) | |
download | qemu-6aec830e77a3f80952b41e421dc23c0041c1e399.zip qemu-6aec830e77a3f80952b41e421dc23c0041c1e399.tar.gz qemu-6aec830e77a3f80952b41e421dc23c0041c1e399.tar.bz2 |
qemu-img convert: Free @sn_opts in all error cases
@sn_opts is initialized at the beginning, so it should be deleted
after jumping to the lable 'fail_getopt'
Signed-off-by: Guoyi Tu <tu.guoyi@h3c.com>
Message-Id: <6ff1c5d372944494be3932274f75485d@h3c.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qemu-img.c')
-rw-r--r-- | qemu-img.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2751,7 +2751,6 @@ out: qemu_progress_end(); qemu_opts_del(opts); qemu_opts_free(create_opts); - qemu_opts_del(sn_opts); qobject_unref(open_opts); blk_unref(s.target); if (s.src) { @@ -2763,6 +2762,7 @@ out: g_free(s.src_sectors); g_free(s.src_alignment); fail_getopt: + qemu_opts_del(sn_opts); g_free(options); return !!ret; |