All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error
@ 2017-05-15 14:10 Fam Zheng
  2017-05-15 15:00 ` Eric Blake
  2017-05-15 17:53 ` Max Reitz
  0 siblings, 2 replies; 3+ messages in thread
From: Fam Zheng @ 2017-05-15 14:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, Max Reitz, qemu-block

Reported by Coverity.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error
  2017-05-15 14:10 [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error Fam Zheng
@ 2017-05-15 15:00 ` Eric Blake
  2017-05-15 17:53 ` Max Reitz
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2017-05-15 15:00 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, qemu-block, Max Reitz

[-- Attachment #1: Type: text/plain, Size: 361 bytes --]

On 05/15/2017 09:10 AM, Fam Zheng wrote:
> Reported by Coverity.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  qemu-img.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Eric Blake <eblake@redhat.com>


-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error
  2017-05-15 14:10 [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error Fam Zheng
  2017-05-15 15:00 ` Eric Blake
@ 2017-05-15 17:53 ` Max Reitz
  1 sibling, 0 replies; 3+ messages in thread
From: Max Reitz @ 2017-05-15 17:53 UTC (permalink / raw)
  To: Fam Zheng, qemu-devel; +Cc: Kevin Wolf, qemu-block

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]

On 2017-05-15 16:10, Fam Zheng wrote:
> Reported by Coverity.
> 
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>  qemu-img.c | 1 +
>  1 file changed, 1 insertion(+)

Thanks, applied to my block branch:

https://github.com/XanClic/qemu/commits/block

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 498 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-05-15 17:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-15 14:10 [Qemu-devel] [PATCH] qemu-img: Fix leakage of options on error Fam Zheng
2017-05-15 15:00 ` Eric Blake
2017-05-15 17:53 ` Max Reitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.