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] Fix memory leak in domain cleanup spotted by doremifa in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fix memory leak in domain cleanup spotted by doremifa in #xen.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 02 Nov 2005 12:30:06 +0000
Delivery-date: Wed, 02 Nov 2005 12:27:45 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 4ec05d64f202098695329880cd2d25514add6c03
# Parent  89030fab2c3fd094f4256b48c370110c19068f5b
Fix memory leak in domain cleanup spotted by doremifa in #xen.

Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

diff -r 89030fab2c3f -r 4ec05d64f202 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Nov  2 10:21:46 2005
+++ b/tools/console/daemon/io.c Wed Nov  2 10:24:49 2005
@@ -380,12 +380,21 @@
        if (!buffer_empty(&d->buffer))
                return;
 
-       if (d->buffer.data)
+       if (d->buffer.data) {
                free(d->buffer.data);
-       d->buffer.data = NULL;
-       if (d->tty_fd != -1)
+               d->buffer.data = NULL;
+       }
+
+       if (d->tty_fd != -1) {
                close(d->tty_fd);
-       d->tty_fd = -1;
+               d->tty_fd = -1;
+       }
+
+       if (d->conspath) {
+               free(d->conspath);
+               d->conspath = NULL;
+       }
+
        remove_domain(d);
 }
 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix memory leak in domain cleanup spotted by doremifa in #xen., Xen patchbot -unstable <=