mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
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>
This commit is contained in:
parent
d3c9218840
commit
790bbb9768
7 changed files with 11 additions and 11 deletions
|
@ -155,7 +155,7 @@ static AHCIQState *ahci_vboot(const char *cli, va_list ap)
|
|||
{
|
||||
AHCIQState *s;
|
||||
|
||||
s = g_malloc0(sizeof(AHCIQState));
|
||||
s = g_new0(AHCIQState, 1);
|
||||
s->parent = qtest_pc_vboot(cli, ap);
|
||||
alloc_set_flags(s->parent->alloc, ALLOC_LEAK_ASSERT);
|
||||
|
||||
|
@ -1806,7 +1806,7 @@ static void create_ahci_io_test(enum IOMode type, enum AddrMode addr,
|
|||
char *name;
|
||||
AHCIIOTestOptions *opts;
|
||||
|
||||
opts = g_malloc(sizeof(AHCIIOTestOptions));
|
||||
opts = g_new(AHCIIOTestOptions, 1);
|
||||
opts->length = len;
|
||||
opts->address_type = addr;
|
||||
opts->io_type = type;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue