Re: [Qemu-devel] [PATCH 14/14] qemu-img: Plug memory leak in convert command

2014-05-27 Thread Benoît Canet
The Monday 26 May 2014 à 19:37:15 (+0200), Markus Armbruster wrote :
 Introduced in commit 661a0f7.  Spotted by Coverity.
 
 Signed-off-by: Markus Armbruster arm...@redhat.com
 ---
  qemu-img.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/qemu-img.c b/qemu-img.c
 index 62ea27e..d118da5 100644
 --- a/qemu-img.c
 +++ b/qemu-img.c
 @@ -1455,7 +1455,7 @@ static int img_convert(int argc, char **argv)
  ret = bdrv_parse_cache_flags(cache, flags);
  if (ret  0) {
  error_report(Invalid cache option: %s, cache);
 -return -1;
 +goto out;
  }
  
  out_bs = bdrv_new_open(target, out_filename, out_fmt, flags, true, 
 quiet);
 -- 
 1.9.3
 
 
Reviewed-by: Benoit Canet ben...@irqsave.net



[Qemu-devel] [PATCH 14/14] qemu-img: Plug memory leak in convert command

2014-05-26 Thread Markus Armbruster
Introduced in commit 661a0f7.  Spotted by Coverity.

Signed-off-by: Markus Armbruster arm...@redhat.com
---
 qemu-img.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-img.c b/qemu-img.c
index 62ea27e..d118da5 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1455,7 +1455,7 @@ static int img_convert(int argc, char **argv)
 ret = bdrv_parse_cache_flags(cache, flags);
 if (ret  0) {
 error_report(Invalid cache option: %s, cache);
-return -1;
+goto out;
 }
 
 out_bs = bdrv_new_open(target, out_filename, out_fmt, flags, true, 
quiet);
-- 
1.9.3