mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
If libxl_ctx_alloc() returns an error, we need to destroy the logger that we made. Restructure the Close() method such that it checks for each resource to be freed and then frees it. This allows Close() to be come idempotent, as well as to be a useful clean-up to a partially-created context. Signed-off-by: George Dunlap <george.dunlap@citrix.com> Reviewed-by: Nick Rosbrook <rosbrookn@ainfosec.com>