qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] qcow2: free old snapshots array upon creatio


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH v2] qcow2: free old snapshots array upon creation of a new one
Date: Thu, 08 Jan 2009 13:32:55 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Uri Lublin wrote:
From: Uri Lublin <address@hidden>

Don't leak memory

Rebased for qemu tree.

Signed-off-by: Uri Lublin <address@hidden>

Applied. Well, sort of. It appears to be whitespace damaged and didn't apply. It was simple enough that I just made the change manually though.

Regards,

Anthony Liguori

---
 block-qcow2.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/block-qcow2.c b/block-qcow2.c
index 707109e..9aa7261 100644
--- a/block-qcow2.c
+++ b/block-qcow2.c
@@ -2024,6 +2024,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;






reply via email to

[Prev in Thread] Current Thread [Next in Thread]