aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/libqos.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2017-10-06 20:49:56 -0300
committerThomas Huth <thuth@redhat.com>2017-10-16 13:29:49 +0200
commit790bbb9768e6a21920e76989f931db80ca67dc10 (patch)
tree0fc32564560acb9210742fb2a5fa947b8f7d5fb7 /tests/libqos/libqos.c
parentd3c9218840c070f1c81ac20bc02fb6aafc6e3803 (diff)
downloadqemu-790bbb9768e6a21920e76989f931db80ca67dc10.zip
qemu-790bbb9768e6a21920e76989f931db80ca67dc10.tar.gz
qemu-790bbb9768e6a21920e76989f931db80ca67dc10.tar.bz2
tests: use g_new() family of functions
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> [PMD: split of some files in other commits of the same series, add libqtest.c] Acked-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqos/libqos.c')
-rw-r--r--tests/libqos/libqos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libqos/libqos.c b/tests/libqos/libqos.c
index 6226546..991bc1a 100644
--- a/tests/libqos/libqos.c
+++ b/tests/libqos/libqos.c
@@ -17,7 +17,7 @@ QOSState *qtest_vboot(QOSOps *ops, const char *cmdline_fmt, va_list ap)
{
char *cmdline;
- struct QOSState *qs = g_malloc(sizeof(QOSState));
+ struct QOSState *qs = g_new(QOSState, 1);
cmdline = g_strdup_vprintf(cmdline_fmt, ap);
qs->qts = qtest_start(cmdline);