diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-11-20 11:01:20 +0000 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-11-20 11:01:20 +0000 |
| commit | bf12043acc6458e7b71d19a9f030b31ec22fba12 (patch) | |
| tree | e86dfe8d5d45f37619d9284cc5abd37140404823 | |
| parent | 39e2821077e6dcf788b7c2a9ef50970ec7995437 (diff) | |
| parent | 6c77aa909e0eec6531e2398d0e9e60ec6a9339c6 (diff) | |
| download | focaccia-qemu-bf12043acc6458e7b71d19a9f030b31ec22fba12.tar.gz focaccia-qemu-bf12043acc6458e7b71d19a9f030b31ec22fba12.zip | |
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
virtio, acpi: fixes A couple of bugfixes. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Wed 20 Nov 2019 09:57:44 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * remotes/mst/tags/for_upstream: tests: acpi: always retain dumped ACPI tables in case of error vhost-user-input: use free(elem) instead of g_free(elem) libvhost-user: Zero memory allocated for VuVirtqInflightDesc Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| -rw-r--r-- | contrib/libvhost-user/libvhost-user.c | 2 | ||||
| -rw-r--r-- | contrib/vhost-user-input/main.c | 4 | ||||
| -rw-r--r-- | tests/bios-tables-test.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c index 68c27136ae..ec27b78ff1 100644 --- a/contrib/libvhost-user/libvhost-user.c +++ b/contrib/libvhost-user/libvhost-user.c @@ -992,7 +992,7 @@ vu_check_queue_inflights(VuDev *dev, VuVirtq *vq) vq->shadow_avail_idx = vq->last_avail_idx = vq->inuse + vq->used_idx; if (vq->inuse) { - vq->resubmit_list = malloc(sizeof(VuVirtqInflightDesc) * vq->inuse); + vq->resubmit_list = calloc(vq->inuse, sizeof(VuVirtqInflightDesc)); if (!vq->resubmit_list) { return -1; } diff --git a/contrib/vhost-user-input/main.c b/contrib/vhost-user-input/main.c index 449fd2171a..ef4b7769f2 100644 --- a/contrib/vhost-user-input/main.c +++ b/contrib/vhost-user-input/main.c @@ -77,7 +77,7 @@ static void vi_input_send(VuInput *vi, struct virtio_input_event *event) len = iov_from_buf(elem->in_sg, elem->in_num, 0, &vi->queue[i].event, sizeof(virtio_input_event)); vu_queue_push(dev, vq, elem, len); - g_free(elem); + free(elem); } vu_queue_notify(&vi->dev.parent, vq); @@ -153,7 +153,7 @@ static void vi_handle_sts(VuDev *dev, int qidx) 0, &event, sizeof(event)); vi_handle_status(vi, &event); vu_queue_push(dev, vq, elem, len); - g_free(elem); + free(elem); } vu_queue_notify(&vi->dev.parent, vq); diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 0b33fb265f..79f5da092f 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -437,11 +437,11 @@ static void test_acpi_asl(test_data *data) g_assert(!err || exp_err); if (g_strcmp0(asl->str, exp_asl->str)) { + sdt->tmp_files_retain = true; if (exp_err) { fprintf(stderr, "Warning! iasl couldn't parse the expected aml\n"); } else { - sdt->tmp_files_retain = true; exp_sdt->tmp_files_retain = true; fprintf(stderr, "acpi-test: Warning! %.4s mismatch. " |