All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path
@ 2014-03-28 17:38 Prasad Joshi
  2014-03-28 22:26 ` Max Reitz
  2014-03-31  9:03 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Prasad Joshi @ 2014-03-28 17:38 UTC (permalink / raw)
  To: prasadjoshi.linux; +Cc: qemu-trivial, kwolf, qemu-devel, stefanha

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
 block/qcow2.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/qcow2.c b/block/qcow2.c
index b9dc960..10eccf9 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -506,6 +506,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
                                    s->incompatible_features &
                                    ~QCOW2_INCOMPAT_MASK);
         ret = -ENOTSUP;
+        g_free(feature_table);
         goto fail;
     }
 
@@ -745,6 +746,9 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
     if (s->l2_table_cache) {
         qcow2_cache_destroy(bs, s->l2_table_cache);
     }
+    if (s->refcount_block_cache) {
+        qcow2_cache_destroy(bs, s->refcount_block_cache);
+    }
     g_free(s->cluster_cache);
     qemu_vfree(s->cluster_data);
     return ret;
-- 
1.8.1.2

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

* Re: [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path
  2014-03-28 17:38 [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path Prasad Joshi
@ 2014-03-28 22:26 ` Max Reitz
  2014-03-31  9:03 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Max Reitz @ 2014-03-28 22:26 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: qemu-trivial, kwolf, qemu-devel, stefanha

On 28.03.2014 18:38, Prasad Joshi wrote:
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
> ---
>   block/qcow2.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/block/qcow2.c b/block/qcow2.c
> index b9dc960..10eccf9 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -506,6 +506,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
>                                      s->incompatible_features &
>                                      ~QCOW2_INCOMPAT_MASK);
>           ret = -ENOTSUP;
> +        g_free(feature_table);
>           goto fail;
>       }
>   
> @@ -745,6 +746,9 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
>       if (s->l2_table_cache) {
>           qcow2_cache_destroy(bs, s->l2_table_cache);
>       }
> +    if (s->refcount_block_cache) {
> +        qcow2_cache_destroy(bs, s->refcount_block_cache);
> +    }
>       g_free(s->cluster_cache);
>       qemu_vfree(s->cluster_data);
>       return ret;

Reviewed-by: Max Reitz <mreitz@redhat.com>

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

* Re: [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path
  2014-03-28 17:38 [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path Prasad Joshi
  2014-03-28 22:26 ` Max Reitz
@ 2014-03-31  9:03 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2014-03-31  9:03 UTC (permalink / raw)
  To: Prasad Joshi; +Cc: qemu-trivial, kwolf, qemu-devel

On Fri, Mar 28, 2014 at 11:08:58PM +0530, Prasad Joshi wrote:
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
> ---
>  block/qcow2.c | 4 ++++
>  1 file changed, 4 insertions(+)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

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

end of thread, other threads:[~2014-03-31  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-28 17:38 [Qemu-devel] [PATCH] qcow2: fix two memory leaks in qcow2_open error code path Prasad Joshi
2014-03-28 22:26 ` Max Reitz
2014-03-31  9:03 ` Stefan Hajnoczi

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.