thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone
218e99
From 5d33e5e1bedee73ef893f1ad4141e8a613e15a84 Mon Sep 17 00:00:00 2001
218e99
Message-Id: <5d33e5e1bedee73ef893f1ad4141e8a613e15a84.1383564115.git.minovotn@redhat.com>
218e99
In-Reply-To: <5575e0aec51f40ebec46e98ec085cda053283aba.1383564115.git.minovotn@redhat.com>
218e99
References: <5575e0aec51f40ebec46e98ec085cda053283aba.1383564115.git.minovotn@redhat.com>
218e99
From: Markus Armbruster <armbru@redhat.com>
218e99
Date: Fri, 27 Sep 2013 13:31:17 +0200
218e99
Subject: [PATCH 07/14] libqtest: Plug fd and memory leaks in qtest_quit()
218e99
MIME-Version: 1.0
218e99
Content-Type: text/plain; charset=UTF-8
218e99
Content-Transfer-Encoding: 8bit
218e99
218e99
RH-Author: Markus Armbruster <armbru@redhat.com>
218e99
Message-id: <1380288680-26645-8-git-send-email-armbru@redhat.com>
218e99
Patchwork-id: 54561
218e99
O-Subject: [PATCH 7.0 qemu-kvm 07/10] libqtest: Plug fd and memory leaks in qtest_quit()
218e99
Bugzilla: 997817
218e99
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
218e99
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
218e99
RH-Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
218e99
218e99
From: Markus Armbruster <armbru@redhat.com>
218e99
218e99
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
218e99
Signed-off-by: Markus Armbruster <armbru@redhat.com>
218e99
Reviewed-by: Andreas Färber <afaerber@suse.de>
218e99
Message-id: 1371711329-9144-2-git-send-email-armbru@redhat.com
218e99
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
218e99
(cherry picked from commit fdd26fca3ce66863e547560fbde1a444fc5d71b7)
218e99
---
218e99
 tests/libqtest.c | 4 ++++
218e99
 1 file changed, 4 insertions(+)
218e99
218e99
Signed-off-by: Michal Novotny <minovotn@redhat.com>
218e99
---
218e99
 tests/libqtest.c | 4 ++++
218e99
 1 file changed, 4 insertions(+)
218e99
218e99
diff --git a/tests/libqtest.c b/tests/libqtest.c
218e99
index 879ffe9..bb82069 100644
218e99
--- a/tests/libqtest.c
218e99
+++ b/tests/libqtest.c
218e99
@@ -171,12 +171,16 @@ void qtest_quit(QTestState *s)
218e99
         waitpid(pid, &status, 0);
218e99
     }
218e99
 
218e99
+    close(s->fd);
218e99
+    close(s->qmp_fd);
218e99
+    g_string_free(s->rx, true);
218e99
     unlink(s->pid_file);
218e99
     unlink(s->socket_path);
218e99
     unlink(s->qmp_socket_path);
218e99
     g_free(s->pid_file);
218e99
     g_free(s->socket_path);
218e99
     g_free(s->qmp_socket_path);
218e99
+    g_free(s);
218e99
 }
218e99
 
218e99
 static void socket_sendf(int fd, const char *fmt, va_list ap)
218e99
-- 
218e99
1.7.11.7
218e99