• C
    libxl: fix resource leaks in libxlDomainStart error paths · 45fc2c14
    Chunyan Liu 提交于
    libxlDomainStart allocates and reserves resources that were not
    being released in error paths. libxlDomainCleanup already handles
    the job of releasing resources, and libxlDomainStart should call
    it when encountering a failure.
    
    Change the error handling logic to call libxlDomainCleanup on
    failure. This includes acquiring the lease sooner and allowing
    it to be released in libxlDomainCleanup on failure, similar to
    the way other resources are reclaimed. With the lease now
    released in libxlDomainCleanup, the release_dom label can be
    renamed to cleanup_dom to better reflect its changed semantics.
    Signed-off-by: NJim Fehlig <jfehlig@suse.com>
    45fc2c14
libxl_domain.c 35.6 KB