aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2013-06-20 08:55:28 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-18 11:32:54 -0500
commitfdd26fca3ce66863e547560fbde1a444fc5d71b7 (patch)
treec8ccb7caa452e45dda67173b2be4e3107eafeff5
parent293d2a0014a0e849477413f55aaa05f2743b2e04 (diff)
libqtest: Plug fd and memory leaks in qtest_quit()
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Message-id: 1371711329-9144-2-git-send-email-armbru@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--tests/libqtest.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c
index 879ffe91dc..bb82069f5c 100644
--- a/tests/libqtest.c
+++ b/tests/libqtest.c
@@ -171,12 +171,16 @@ void qtest_quit(QTestState *s)
waitpid(pid, &status, 0);
}
+ close(s->fd);
+ close(s->qmp_fd);
+ g_string_free(s->rx, true);
unlink(s->pid_file);
unlink(s->socket_path);
unlink(s->qmp_socket_path);
g_free(s->pid_file);
g_free(s->socket_path);
g_free(s->qmp_socket_path);
+ g_free(s);
}
static void socket_sendf(int fd, const char *fmt, va_list ap)