From 790bbb9768e6a21920e76989f931db80ca67dc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Fri, 6 Oct 2017 20:49:56 -0300 Subject: tests: use g_new() family of functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau Signed-off-by: Philippe Mathieu-Daudé [PMD: split of some files in other commits of the same series, add libqtest.c] Acked-by: John Snow Reviewed-by: Thomas Huth Signed-off-by: Thomas Huth --- tests/libqtest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/libqtest.c') diff --git a/tests/libqtest.c b/tests/libqtest.c index cbd709470b..adf71188b6 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -171,7 +171,7 @@ QTestState *qtest_init_without_qmp_handshake(const char *extra_args) gchar *command; const char *qemu_binary = qtest_qemu_binary(); - s = g_malloc(sizeof(*s)); + s = g_new(QTestState, 1); socket_path = g_strdup_printf("/tmp/qtest-%d.sock", getpid()); qmp_socket_path = g_strdup_printf("/tmp/qtest-%d.qmp", getpid()); -- cgit v1.2.3