qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/2] qemu-char.c: Fix memory leaks in qemu_chr_open_pty when openpty fails
@ 2010-04-15 21:41 Thomas Bächler
  2010-04-15 21:41 ` [Qemu-devel] [PATCH 2/2] Add a 'screen' backend to qemu-char.c Thomas Bächler
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Bächler @ 2010-04-15 21:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Bächler, kvm

---
 qemu-char.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/qemu-char.c b/qemu-char.c
index 05df971..d845572 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -986,6 +986,8 @@ static CharDriverState *qemu_chr_open_pty(QemuOpts *opts)
     s = qemu_mallocz(sizeof(PtyCharDriver));
 
     if (openpty(&s->fd, &slave_fd, pty_name, NULL, NULL) < 0) {
+        qemu_free(chr);
+        qemu_free(s);
         return NULL;
     }
 
-- 
1.7.0.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-15 21:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-15 21:41 [Qemu-devel] [PATCH 1/2] qemu-char.c: Fix memory leaks in qemu_chr_open_pty when openpty fails Thomas Bächler
2010-04-15 21:41 ` [Qemu-devel] [PATCH 2/2] Add a 'screen' backend to qemu-char.c Thomas Bächler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).