This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [qemu-xen-unstable] fix few small memory leaks in qemu v

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] fix few small memory leaks in qemu vga.c xenstore.c
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Thu, 29 Oct 2009 06:05:03 -0700
Delivery-date: Thu, 29 Oct 2009 06:05:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit 7990ddfd1119657fef7c661156a25d00e184766d
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Thu Oct 22 18:38:47 2009 +0100

    fix few small memory leaks in qemu vga.c xenstore.c
    running qemu with valgrind I found few small memory leaks, this patch
    fixes them.
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
 hw/vga.c   |    1 +
 xenstore.c |    6 +++++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index 90bd544..ccbcda9 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2538,6 +2538,7 @@ void xen_vga_vram_map(uint64_t vram_addr, uint32_t 
+    free(pfn_list);
 /* when used on xen environment, the vga_ram_base is not used */
diff --git a/xenstore.c b/xenstore.c
index 694152a..b5a791e 100644
--- a/xenstore.c
+++ b/xenstore.c
@@ -709,7 +709,7 @@ static void xenstore_process_logdirty_event(void)
     act = xs_read(xsh, XBT_NULL, cmd_path, &len);
     if (!act) {
         fprintf(logfile, "Log-dirty: no command yet.\n");
-        return;
+        goto out;
     fprintf(logfile, "Log-dirty command %s\n", act);
@@ -724,7 +724,11 @@ static void xenstore_process_logdirty_event(void)
     /* Ack that we've service the command */
     xs_write(xsh, XBT_NULL, ret_path, act, len);
+    free(ret_path);
+    free(cmd_path);
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] fix few small memory leaks in qemu vga.c xenstore.c, Ian Jackson <=