[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [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> --- 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |