qcow2: Fix leak of QemuOpts in qcow2_open()
authorMax Reitz <mreitz@redhat.com>
Wed, 20 Aug 2014 17:59:33 +0000 (19:59 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 Sep 2014 10:39:32 +0000 (11:39 +0100)
commit7b17ce60cc58b3c20b3e708a2d69f6bbe2b4edfa
treea83325c07823caa9a7efb2cc6763c95c84f2bf13
parent93bb1315250dd010e65dc067af103cbaf0de03ae
qcow2: Fix leak of QemuOpts in qcow2_open()

Currently, the QemuOpts object opts is leaked if anything fails from its
creation up to and including the image repair block. Fix this by freeing
that object in the fail path.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com>
Message-id: 1408557576-14574-2-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2.c