[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/12] block/file-posix: fix a possible undefined behavior
From: |
Stefano Garzarella |
Subject: |
Re: [PATCH 10/12] block/file-posix: fix a possible undefined behavior |
Date: |
Mon, 17 Aug 2020 10:57:58 +0200 |
On Fri, Aug 14, 2020 at 12:02:39PM -0400, Pan Nengyuan wrote:
> local_err is not initialized to NULL, it will cause a assert error as below:
> qemu/util/error.c:59: error_setv: Assertion `*errp == NULL' failed.
>
> Fixes: c6447510690
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
> ---
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Max Reitz <mreitz@redhat.com>
> Cc: Aarushi Mehta <mehta.aaru20@gmail.com>
> Cc: qemu-block@nongnu.org
> ---
> block/file-posix.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Thanks,
Stefano
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 9a00d4190a..697a7d9eea 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -2113,7 +2113,7 @@ static void raw_aio_attach_aio_context(BlockDriverState
> *bs,
> #endif
> #ifdef CONFIG_LINUX_IO_URING
> if (s->use_linux_io_uring) {
> - Error *local_err;
> + Error *local_err = NULL;
> if (!aio_setup_linux_io_uring(new_context, &local_err)) {
> error_reportf_err(local_err, "Unable to use linux io_uring, "
> "falling back to thread pool: ");
> --
> 2.18.2
>
>
- Re: [PATCH 04/12] elf2dmp/pdb: Plug memleak in pdb_init_from_file, (continued)
- [PATCH 02/12] hw/vfio/ap: Plug memleak in vfio_ap_get_group(), Pan Nengyuan, 2020/08/14
- [PATCH 12/12] test-util-sockets: Fix a memleak in test_socket_unix_abstract_good, Pan Nengyuan, 2020/08/14
- [PATCH 11/12] vnc-auth-sasl: Plug memleak in vnc_socket_ip_addr_string, Pan Nengyuan, 2020/08/14
- [PATCH 10/12] block/file-posix: fix a possible undefined behavior, Pan Nengyuan, 2020/08/14
- Re: [PATCH 00/12] fix some error memleaks, Pan Nengyuan, 2020/08/26