55714f7 parallels: fix possible crash in case of errors in prlsdkLoadDomain

1 file Authored by Maxim Nestratov 8 years ago, Committed by Dmitry Guryanov 8 years ago,
    parallels: fix possible crash in case of errors in prlsdkLoadDomain
    
    Cleanup code in prlsdkLoadDomain doesn't take into account the fact
    if private domain structure along with freeing function is assigned
    or not. In case it is, we shouldn't call it manually because
    virDomainObjListRemove calls it and frees pdom.
    Also, allocated def structure should be freed only if it's not
    assigned to domain. Otherwise it will be called twice: one time by
    virDomainObjListRemove and the second by prlsdkLoadDomain itself.
    
    Signed-off-by: Maxim Nestratov <mnestratov@parallels.com>
    
        
file modified
+14 -3