diff mbox

[3/4] kvm tool: deallocate the cached l1_table in qcow1_disk_close() and in error path of qcow1_probe()

Message ID 1302877138-6695-3-git-send-email-prasadjoshi124@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Prasad Joshi April 15, 2011, 2:18 p.m. UTC
Signed-off-by: Prasad Joshi <prasadjoshi124@gmail.com>
---
 tools/kvm/qcow.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/tools/kvm/qcow.c b/tools/kvm/qcow.c
index 243bfa8..9b9af86 100644
--- a/tools/kvm/qcow.c
+++ b/tools/kvm/qcow.c
@@ -115,6 +115,7 @@  static void qcow1_disk_close(struct disk_image *self)
 
 	q = self->priv;
 
+	free(q->table.l1_table);
 	free(q->header);
 	free(q);
 }
@@ -200,6 +201,7 @@  error:
 	if (!q)
 		return NULL;
 
+	free(q->table.l1_table);
 	free(q->header);
 	free(q);