|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] Fix memory leak in domain cleanup spotted by doremifa in
# 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 <=
|
|
|
|
|