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@citrix.com>
Fixes: 86234eafb9 ("libs: add libxenhypfs")
Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Release-acked-by: Paul Durrant <paul@xen.org>
Acked-by: Wei Liu <wl@xen.org>
This commit is contained in:
Juergen Gross authored and Wei Liu committed 2020-06-09 15:35:15 +00:00
1 parent 1a58d8dab5
commit 30a72f0287
1 file changed
+1 -1
+1 -1
View File
@@ -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;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.