aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-12-17 13:15:38 -0800
committerRichard Henderson <richard.henderson@linaro.org>2021-12-17 13:15:38 -0800
commit90978e15bc9a23c208b25bf7ea697a5d0925562b (patch)
tree6bdc96b7eefd208ef671395e898f6e2aa36f745e /tests
parent93dc314c9225e103487ae22b62da1ac59ac86325 (diff)
parentce2ff9cccf0c5f123f9d1e3d5e4fc07d1c2c159d (diff)
Merge tag 'trivial-branch-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging
Trivial patches pull request 20211217 # gpg: Signature made Fri 17 Dec 2021 12:09:51 PM PST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [unknown] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [unknown] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * tag 'trivial-branch-for-7.0-pull-request' of https://gitlab.com/laurent_vivier/qemu: checkpatch: Do not allow deprecated g_memdup() tests/qtest: Replace g_memdup() by g_memdup2() glib-compat: Introduce g_memdup2() wrapper docs/block-replication.txt: Fix replication top-id command demo hw/virtio/vhost: Fix typo in comment. hw/avr: Realize AVRCPU qdev object using qdev_realize() qemu-keymap: Add license in generated files target/i386/kvm: Replace use of __u32 type configure: Symlink binaries using .exe suffix with MinGW Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/qtest/libqos/ahci.c6
-rw-r--r--tests/qtest/libqos/qgraph.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c
index fba3e7a954..eaa2096512 100644
--- a/tests/qtest/libqos/ahci.c
+++ b/tests/qtest/libqos/ahci.c
@@ -639,8 +639,8 @@ void ahci_exec(AHCIQState *ahci, uint8_t port,
AHCIOpts *opts;
uint64_t buffer_in;
- opts = g_memdup((opts_in == NULL ? &default_opts : opts_in),
- sizeof(AHCIOpts));
+ opts = g_memdup2((opts_in == NULL ? &default_opts : opts_in),
+ sizeof(AHCIOpts));
buffer_in = opts->buffer;
@@ -860,7 +860,7 @@ AHCICommand *ahci_command_create(uint8_t command_name)
g_assert(!props->ncq || props->lba48);
/* Defaults and book-keeping */
- cmd->props = g_memdup(props, sizeof(AHCICommandProp));
+ cmd->props = g_memdup2(props, sizeof(AHCICommandProp));
cmd->name = command_name;
cmd->xbytes = props->size;
cmd->prd_size = 4096;
diff --git a/tests/qtest/libqos/qgraph.c b/tests/qtest/libqos/qgraph.c
index d1dc491930..109ff04e1e 100644
--- a/tests/qtest/libqos/qgraph.c
+++ b/tests/qtest/libqos/qgraph.c
@@ -93,7 +93,7 @@ static void add_edge(const char *source, const char *dest,
edge->type = type;
edge->dest = g_strdup(dest);
edge->edge_name = g_strdup(opts->edge_name ?: dest);
- edge->arg = g_memdup(opts->arg, opts->size_arg);
+ edge->arg = g_memdup2(opts->arg, opts->size_arg);
edge->before_cmd_line =
opts->before_cmd_line ? g_strconcat(" ", opts->before_cmd_line, NULL) : NULL;