qcow2: remove memory leak
authorFrediano Ziglio <freddy77@gmail.com>
Tue, 23 Aug 2011 13:21:20 +0000 (15:21 +0200)
committerKevin Wolf <kwolf@redhat.com>
Tue, 23 Aug 2011 15:41:15 +0000 (17:41 +0200)
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2.c

index 37dab656ab168d9f28212282965ad336015809dd..b725d68b1dc867764249e4b1384b58573e435e73 100644 (file)
@@ -496,6 +496,7 @@ fail:
     qemu_co_mutex_unlock(&s->lock);
 
     qemu_iovec_destroy(&hd_qiov);
+    g_free(cluster_data);
 
     return ret;
 }
@@ -608,6 +609,7 @@ fail:
     qemu_co_mutex_unlock(&s->lock);
 
     qemu_iovec_destroy(&hd_qiov);
+    g_free(cluster_data);
 
     return ret;
 }