qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-block] [PATCH] qemu-img: Fix leakage of options on error


From: Fam Zheng
Subject: [Qemu-block] [PATCH] qemu-img: Fix leakage of options on error
Date: Mon, 15 May 2017 22:10:14 +0800

Reported by Coverity.

Signed-off-by: Fam Zheng <address@hidden>
---
 qemu-img.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/qemu-img.c b/qemu-img.c
index b506839..8b0dfa7 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -294,6 +294,7 @@ static BlockBackend *img_open_opts(const char *optstr,
         if (qdict_haskey(options, BDRV_OPT_FORCE_SHARE)
             && !qdict_get_bool(options, BDRV_OPT_FORCE_SHARE)) {
             error_report("--force-share/-U conflicts with image options");
+            QDECREF(options);
             return NULL;
         }
         qdict_put(options, BDRV_OPT_FORCE_SHARE, qbool_from_bool(true));
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]