Patchwork [v3,13/15] qcow2: remove memory leak

login
register
mail settings
Submitter Frediano Ziglio
Date Aug. 23, 2011, 1:21 p.m.
Message ID <1314105682-28396-14-git-send-email-freddy77@gmail.com>
Download mbox | patch
Permalink /patch/111106/
State New
Headers show

Comments

Frediano Ziglio - Aug. 23, 2011, 1:21 p.m.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
---
 block/qcow2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Patch

diff --git a/block/qcow2.c b/block/qcow2.c
index d34bd72..07529b1 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -492,6 +492,7 @@  fail:
     qemu_co_mutex_unlock(&s->lock);
 
     qemu_iovec_destroy(&hd_qiov);
+    g_free(cluster_data);
 
     return ret;
 }
@@ -604,6 +605,7 @@  fail:
     qemu_co_mutex_unlock(&s->lock);
 
     qemu_iovec_destroy(&hd_qiov);
+    g_free(cluster_data);
 
     return ret;
 }