mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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:
1 parent
1a58d8dab5
commit
30a72f0287
1 file changed
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||