projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
53c2e71
)
vmdk: fix double free
author
Juan Quintela
<quintela@redhat.com>
Thu, 4 Mar 2010 09:00:36 +0000
(10:00 +0100)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Tue, 9 Mar 2010 17:23:00 +0000
(11:23 -0600)
fail_gd error case would also free rgd_buf that was already freed
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/vmdk.c
patch
|
blob
|
history
diff --git
a/block/vmdk.c
b/block/vmdk.c
index
67a690e
..
819c1c9
100644
(file)
--- a/
block/vmdk.c
+++ b/
block/vmdk.c
@@
-315,7
+315,6
@@
static int vmdk_snapshot_create(const char *filename, const char *backing_file)
ret = -errno;
goto fail_rgd;
}
- qemu_free(rgd_buf);
/* write GD */
gd_buf = qemu_malloc(gd_size);
@@
-336,6
+335,7
@@
static int vmdk_snapshot_create(const char *filename, const char *backing_file)
goto fail_gd;
}
qemu_free(gd_buf);
+ qemu_free(rgd_buf);
close(p_fd);
close(snp_fd);