[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [PATCH for-4.14 1/2] tools: fix error path of xenhypfs_open()



> -----Original Message-----
> From: Juergen Gross <jgross@xxxxxxxx>
> Sent: 09 June 2020 15:49
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: paul@xxxxxxx; Juergen Gross <jgross@xxxxxxxx>; Ian Jackson 
> <ian.jackson@xxxxxxxxxxxxx>; Wei Liu
> <wl@xxxxxxx>; Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Subject: [PATCH for-4.14 1/2] tools: fix error path of xenhypfs_open()
> 
> In case of an error in xenhypfs_open() the error path will cause a
> segmentation fault due to a wrong sequence of closing calls.
> 
> Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

Reviewed-by: Paul Durrant <paul@xxxxxxx>
Release-acked-by: Paul Durrant <paul@xxxxxxx>

> ---
>  tools/libs/hypfs/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/libs/hypfs/core.c b/tools/libs/hypfs/core.c
> index c91e165705..fc23b02586 100644
> --- a/tools/libs/hypfs/core.c
> +++ b/tools/libs/hypfs/core.c
> @@ -74,8 +74,8 @@ xenhypfs_handle *xenhypfs_open(xentoollog_logger *logger,
>      return fshdl;
> 
>  err:
> -    xtl_logger_destroy(fshdl->logger_tofree);
>      xencall_close(fshdl->xcall);
> +    xtl_logger_destroy(fshdl->logger_tofree);
>      free(fshdl);
>      return NULL;
>  }
> --
> 2.26.2





 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.