qcow2: free old snapshots array upon creation of a new one
PATCH 1/1 qcow2: free old snapshots array upon creation of a new one
Don't leak memory
Signed-off-by Uri Lublin <[email protected]>
--- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
qemu/block-qcow2.c +1 -0
@@ -2021,6 +2021,7 @@ static int qcow_snapshot_create(BlockDriverState *bs,if (!snapshots1) goto fail;memcpy (snapshots1, s->snapshots, s->nb_snapshots *sizeof (QCowSnapshot)); +qemu_free (s->snapshots); s->snapshots = snapshots1; s->snapshots[s->nb_snapshots++] = *sn;
Quoted 6 lines · Uri Lublin
Don't leak memory
Signed-off-by Uri Lublin <[email protected]>--- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Please don't send patches against kvm-userspace.
Regards,
Anthony Liguori
Quoted 17 lines
qemu/block-qcow2.c +1
-0@@ -2021,6 +2021,7 @@ static int qcow_snapshot_create(BlockDriverState *bs, if (!snapshots1) goto fail;memcpy (snapshots1, s->snapshots, s->nb_snapshots *sizeof (QCowSnapshot)); +qemu_free (s->snapshots); s->snapshots = snapshots1;s->snapshots[s->nb_snapshots++] = *sn;
Hi,
Quoted 9 lines · Anthony Liguori
Quoted 6 lines · Uri Lublin
Don't leak memory
Signed-off-by Uri Lublin <[email protected]>--- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)Please don't send patches against kvm-userspace.
git am -p2 <mbox>
Hth,
Dscho
Quoted 14 lines · Johannes Schindelin
Hi,
Quoted 9 lines · Anthony Liguori
Quoted 7 lines · Uri Lublin
Don't leak memory
Signed-off-by Uri Lublin <[email protected]>--- qemu/block-qcow2.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Quoted 5 lines
Quoted 2 lines
Please don't send patches against kvm-userspace.
git am -p2 <mbox>
That doesn't test the patch against upstream qemu.
Signature · 1 line
error compiling committee.c: too many arguments to function