WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [qemu-xen-3.4-testing] xen_console: fix memory leak "typ

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-3.4-testing] xen_console: fix memory leak "type"
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 12 Jan 2010 10:00:18 -0800
Delivery-date: Tue, 12 Jan 2010 10:00:15 -0800
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 07fd010f8c4d5ae19ecdb202819a03579009da43
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Fri Dec 4 16:15:10 2009 +0000

    xen_console: fix memory leak "type"
    
    Memory leak in con_init.
    
    Signed-off-by: Wei Kong <weikong.cn@xxxxxxxxx>
    (cherry picked from commit 91ae19a7cc445030614bd0ae91548162cf0befbe)
---
 hw/xen_console.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/hw/xen_console.c b/hw/xen_console.c
index c172cf2..6b0811e 100644
--- a/hw/xen_console.c
+++ b/hw/xen_console.c
@@ -197,8 +197,11 @@ static int con_init(struct XenDevice *xendev)
     type = xenstore_read_str(con->console, "type");
     if (!type || 0 != strcmp(type, "ioemu")) {
        xen_be_printf(xendev, 1, "not for me (type=%s)\n", type);
+       if (type)
+           qemu_free(type);
        return -1;
     }
+    qemu_free(type);
 
     if (!serial_hds[con->xendev.dev])
        xen_be_printf(xendev, 1, "WARNING: serial line %d not configured\n",
--
generated by git-patchbot for /home/xen/git/qemu-xen-3.4-testing.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-3.4-testing] xen_console: fix memory leak "type", Ian Jackson <=