mirror of https://github.com/xemu-project/xemu.git
quorum: Fix leak of opts in quorum_open
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Benoît Canet <benoit.canet@nodalink.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
3158593126
commit
8df3abfcee
|
@ -868,7 +868,7 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags,
|
||||||
{
|
{
|
||||||
BDRVQuorumState *s = bs->opaque;
|
BDRVQuorumState *s = bs->opaque;
|
||||||
Error *local_err = NULL;
|
Error *local_err = NULL;
|
||||||
QemuOpts *opts;
|
QemuOpts *opts = NULL;
|
||||||
bool *opened;
|
bool *opened;
|
||||||
QDict *sub = NULL;
|
QDict *sub = NULL;
|
||||||
QList *list = NULL;
|
QList *list = NULL;
|
||||||
|
@ -989,6 +989,7 @@ close_exit:
|
||||||
g_free(s->bs);
|
g_free(s->bs);
|
||||||
g_free(opened);
|
g_free(opened);
|
||||||
exit:
|
exit:
|
||||||
|
qemu_opts_del(opts);
|
||||||
/* propagate error */
|
/* propagate error */
|
||||||
if (local_err) {
|
if (local_err) {
|
||||||
error_propagate(errp, local_err);
|
error_propagate(errp, local_err);
|
||||||
|
|
Loading…
Reference in New Issue